Skip to content

Commit

Permalink
Merge pull request #36 from fortressforever-2013/main-revert-trigger-…
Browse files Browse the repository at this point in the history
…test

revert #34 fix as it caused crashes
  • Loading branch information
azzyr authored Jun 30, 2024
2 parents 2f60139 + 0dfa204 commit 98adbfc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
1 change: 0 additions & 1 deletion mp/src/game/server/baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ enum Class_T
CLASS_TURRET,
CLASS_BACKPACK,
CLASS_INFOSCRIPT,
CLASS_TRIGGER,
CLASS_TRIGGERSCRIPT,
CLASS_TRIGGER_CLIP,
CLASS_TEAMSPAWN,
Expand Down
17 changes: 2 additions & 15 deletions mp/src/game/server/cbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,7 @@ void CBaseEntityOutput::FireOutput(variant_t Value, CBaseEntity *pActivator, CBa
//
// Post the event with the default parameter.
//
if ( ( pCaller->Classify() == CLASS_TRIGGER || pCaller->Classify() == CLASS_TRIGGERSCRIPT || pCaller->Classify() == CLASS_TRIGGER_CLIP )
&& pCaller->GetName() == STRING( ev->m_iTarget ) )
{
g_EventQueue.AddEvent( pCaller, STRING(ev->m_iTargetInput), Value, ev->m_flDelay + fDelay, pActivator, pCaller, ev->m_iIDStamp );
}
else
g_EventQueue.AddEvent( STRING(ev->m_iTarget), STRING(ev->m_iTargetInput), Value, ev->m_flDelay + fDelay, pActivator, pCaller, ev->m_iIDStamp );
g_EventQueue.AddEvent( STRING(ev->m_iTarget), STRING(ev->m_iTargetInput), Value, ev->m_flDelay + fDelay, pActivator, pCaller, ev->m_iIDStamp );
}
else
{
Expand All @@ -300,14 +294,7 @@ void CBaseEntityOutput::FireOutput(variant_t Value, CBaseEntity *pActivator, CBa
//
variant_t ValueOverride;
ValueOverride.SetString( ev->m_iParameter );

if ( ( pCaller->Classify() == CLASS_TRIGGER || pCaller->Classify() == CLASS_TRIGGERSCRIPT || pCaller->Classify() == CLASS_TRIGGER_CLIP )
&& pCaller->GetName() == STRING( ev->m_iTarget ) )
{
g_EventQueue.AddEvent( pCaller, STRING(ev->m_iTargetInput), ValueOverride, ev->m_flDelay, pActivator, pCaller, ev->m_iIDStamp );
}
else
g_EventQueue.AddEvent( STRING(ev->m_iTarget), STRING(ev->m_iTargetInput), ValueOverride, ev->m_flDelay, pActivator, pCaller, ev->m_iIDStamp );
g_EventQueue.AddEvent( STRING(ev->m_iTarget), STRING(ev->m_iTargetInput), ValueOverride, ev->m_flDelay, pActivator, pCaller, ev->m_iIDStamp );
}

if ( ev->m_flDelay )
Expand Down
2 changes: 0 additions & 2 deletions mp/src/game/server/triggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ class CBaseTrigger : public CBaseToggle
virtual void EndTouchAll() {}
bool IsTouching( CBaseEntity *pOther );

virtual Class_T Classify() { return CLASS_TRIGGER; }

CBaseEntity *GetTouchedEntityOfType( const char *sClassName );

int DrawDebugTextOverlays(void);
Expand Down

0 comments on commit 98adbfc

Please sign in to comment.