mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-25 14:25:32 +03:00
Add OnScriptEvent outputs to ai_hint
This commit is contained in:
parent
e44f60e8d8
commit
0d37ded0eb
@ -9526,6 +9526,12 @@ void CAI_BaseNPC::HandleAnimEvent( animevent_t *pEvent )
|
|||||||
{
|
{
|
||||||
m_hCine->FireScriptEvent( atoi( pEvent->options ) );
|
m_hCine->FireScriptEvent( atoi( pEvent->options ) );
|
||||||
}
|
}
|
||||||
|
#ifdef MAPBASE
|
||||||
|
else if ( GetHintNode() )
|
||||||
|
{
|
||||||
|
GetHintNode()->FireScriptEvent( atoi( pEvent->options ) );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// FIXME: look so see if it's playing a vcd and fire those instead
|
// FIXME: look so see if it's playing a vcd and fire those instead
|
||||||
|
@ -902,6 +902,17 @@ BEGIN_DATADESC( CAI_Hint )
|
|||||||
DEFINE_OUTPUT( m_OnNPCStartedUsing, "OnNPCStartedUsing" ),
|
DEFINE_OUTPUT( m_OnNPCStartedUsing, "OnNPCStartedUsing" ),
|
||||||
DEFINE_OUTPUT( m_OnNPCStoppedUsing, "OnNPCStoppedUsing" ),
|
DEFINE_OUTPUT( m_OnNPCStoppedUsing, "OnNPCStoppedUsing" ),
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[0], "OnScriptEvent01" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[1], "OnScriptEvent02" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[2], "OnScriptEvent03" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[3], "OnScriptEvent04" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[4], "OnScriptEvent05" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[5], "OnScriptEvent06" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[6], "OnScriptEvent07" ),
|
||||||
|
DEFINE_OUTPUT( m_OnScriptEvent[7], "OnScriptEvent08" ),
|
||||||
|
#endif
|
||||||
|
|
||||||
END_DATADESC( );
|
END_DATADESC( );
|
||||||
|
|
||||||
#ifdef MAPBASE_VSCRIPT
|
#ifdef MAPBASE_VSCRIPT
|
||||||
@ -1705,6 +1716,19 @@ void CAI_Hint::NPCStoppedUsing( CAI_BaseNPC *pNPC )
|
|||||||
m_OnNPCStoppedUsing.Set( pNPC, pNPC, this );
|
m_OnNPCStoppedUsing.Set( pNPC, pNPC, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Purpose:
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
void CAI_Hint::FireScriptEvent( int nEvent )
|
||||||
|
{
|
||||||
|
if ( ( nEvent >= 1 ) && ( nEvent <= 8 ) )
|
||||||
|
{
|
||||||
|
m_OnScriptEvent[nEvent - 1].FireOutput( m_hHintOwner, this );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
CON_COMMAND(ai_dump_hints, "")
|
CON_COMMAND(ai_dump_hints, "")
|
||||||
{
|
{
|
||||||
|
@ -323,6 +323,9 @@ public:
|
|||||||
void FixupTargetNode();
|
void FixupTargetNode();
|
||||||
void NPCStartedUsing( CAI_BaseNPC *pNPC );
|
void NPCStartedUsing( CAI_BaseNPC *pNPC );
|
||||||
void NPCStoppedUsing( CAI_BaseNPC *pNPC );
|
void NPCStoppedUsing( CAI_BaseNPC *pNPC );
|
||||||
|
#ifdef MAPBASE
|
||||||
|
void FireScriptEvent( int nEvent );
|
||||||
|
#endif
|
||||||
|
|
||||||
HintIgnoreFacing_t GetIgnoreFacing() const { return m_NodeData.fIgnoreFacing; }
|
HintIgnoreFacing_t GetIgnoreFacing() const { return m_NodeData.fIgnoreFacing; }
|
||||||
|
|
||||||
@ -385,6 +388,10 @@ private:
|
|||||||
float m_nodeFOV;
|
float m_nodeFOV;
|
||||||
Vector m_vecForward;
|
Vector m_vecForward;
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
COutputEvent m_OnScriptEvent[8];
|
||||||
|
#endif
|
||||||
|
|
||||||
// The next hint in list of all hints
|
// The next hint in list of all hints
|
||||||
friend class CAI_HintManager;
|
friend class CAI_HintManager;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user