mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 06:07:56 +03:00
Added OnEntrySequence and OnActionSequence for scripted_sequence
This commit is contained in:
parent
7a87bfdf5e
commit
c48428b678
@ -3979,10 +3979,16 @@ void CAI_BaseNPC::RunTask( const Task_t *pTask )
|
|||||||
// If we have an entry, we have to play it first
|
// If we have an entry, we have to play it first
|
||||||
if ( m_hCine->m_iszEntry != NULL_STRING )
|
if ( m_hCine->m_iszEntry != NULL_STRING )
|
||||||
{
|
{
|
||||||
|
#ifdef MAPBASE
|
||||||
|
m_hCine->OnEntrySequence( this );
|
||||||
|
#endif
|
||||||
m_hCine->StartSequence( (CAI_BaseNPC *)this, m_hCine->m_iszEntry, true );
|
m_hCine->StartSequence( (CAI_BaseNPC *)this, m_hCine->m_iszEntry, true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef MAPBASE
|
||||||
|
m_hCine->OnActionSequence( this );
|
||||||
|
#endif
|
||||||
m_hCine->StartSequence( (CAI_BaseNPC *)this, m_hCine->m_iszPlay, true );
|
m_hCine->StartSequence( (CAI_BaseNPC *)this, m_hCine->m_iszPlay, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,6 +136,8 @@ BEGIN_DATADESC( CAI_ScriptedSequence )
|
|||||||
DEFINE_OUTPUT(m_OnScriptEvent[6], "OnScriptEvent07"),
|
DEFINE_OUTPUT(m_OnScriptEvent[6], "OnScriptEvent07"),
|
||||||
DEFINE_OUTPUT(m_OnScriptEvent[7], "OnScriptEvent08"),
|
DEFINE_OUTPUT(m_OnScriptEvent[7], "OnScriptEvent08"),
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
|
DEFINE_OUTPUT(m_OnEntrySequence, "OnEntrySequence"),
|
||||||
|
DEFINE_OUTPUT(m_OnActionSequence, "OnActionSequence"),
|
||||||
DEFINE_OUTPUT(m_OnPreIdleSequence, "OnPreIdleSequence"),
|
DEFINE_OUTPUT(m_OnPreIdleSequence, "OnPreIdleSequence"),
|
||||||
DEFINE_OUTPUT(m_OnFoundNPC, "OnFoundNPC"),
|
DEFINE_OUTPUT(m_OnFoundNPC, "OnFoundNPC"),
|
||||||
#endif
|
#endif
|
||||||
@ -864,6 +866,16 @@ void CAI_ScriptedSequence::OnBeginSequence( CBaseEntity *pActor )
|
|||||||
m_OnBeginSequence.FireOutput( pActor, this );
|
m_OnBeginSequence.FireOutput( pActor, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAI_ScriptedSequence::OnEntrySequence( CBaseEntity *pActor )
|
||||||
|
{
|
||||||
|
m_OnEntrySequence.FireOutput( pActor, this );
|
||||||
|
}
|
||||||
|
|
||||||
|
void CAI_ScriptedSequence::OnActionSequence( CBaseEntity *pActor )
|
||||||
|
{
|
||||||
|
m_OnActionSequence.FireOutput( pActor, this );
|
||||||
|
}
|
||||||
|
|
||||||
void CAI_ScriptedSequence::OnPreIdleSequence( CBaseEntity *pActor )
|
void CAI_ScriptedSequence::OnPreIdleSequence( CBaseEntity *pActor )
|
||||||
{
|
{
|
||||||
m_OnPreIdleSequence.FireOutput( pActor, this );
|
m_OnPreIdleSequence.FireOutput( pActor, this );
|
||||||
|
@ -97,6 +97,8 @@ public:
|
|||||||
void FireScriptEvent( int nEvent );
|
void FireScriptEvent( int nEvent );
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
void OnBeginSequence( CBaseEntity *pActor );
|
void OnBeginSequence( CBaseEntity *pActor );
|
||||||
|
void OnEntrySequence( CBaseEntity *pActor );
|
||||||
|
void OnActionSequence( CBaseEntity *pActor );
|
||||||
void OnPreIdleSequence( CBaseEntity *pActor );
|
void OnPreIdleSequence( CBaseEntity *pActor );
|
||||||
#else
|
#else
|
||||||
void OnBeginSequence( void );
|
void OnBeginSequence( void );
|
||||||
@ -220,6 +222,8 @@ private:
|
|||||||
COutputEvent m_OnCancelFailedSequence; // Fired when a scene is cancelled before it's ever run
|
COutputEvent m_OnCancelFailedSequence; // Fired when a scene is cancelled before it's ever run
|
||||||
COutputEvent m_OnScriptEvent[MAX_SCRIPT_EVENTS];
|
COutputEvent m_OnScriptEvent[MAX_SCRIPT_EVENTS];
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
|
COutputEvent m_OnEntrySequence;
|
||||||
|
COutputEvent m_OnActionSequence;
|
||||||
COutputEvent m_OnPreIdleSequence;
|
COutputEvent m_OnPreIdleSequence;
|
||||||
COutputEvent m_OnFoundNPC;
|
COutputEvent m_OnFoundNPC;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user