Skip to content

Commit

Permalink
Update cbase.cpp
Browse files Browse the repository at this point in the history
Added missing TriggerScript and TriggerClip checks in `CBaseEntityOutput::FireOutput`.
  • Loading branch information
YoYo178 committed Jun 26, 2024
1 parent 65882be commit 1df2603
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mp/src/game/server/cbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,11 @@ void CBaseEntityOutput::FireOutput(variant_t Value, CBaseEntity *pActivator, CBa
//
// Post the event with the default parameter.
//
if ( pCaller->Classify() == CLASS_TRIGGER && pCaller->GetName() == STRING( ev->m_iTarget ) )
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 );
}
Expand All @@ -298,8 +301,11 @@ void CBaseEntityOutput::FireOutput(variant_t Value, CBaseEntity *pActivator, CBa
variant_t ValueOverride;
ValueOverride.SetString( ev->m_iParameter );

if ( pCaller->Classify() == CLASS_TRIGGER && pCaller->GetName() == STRING( ev->m_iTarget ) )
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 );
}
Expand Down

0 comments on commit 1df2603

Please sign in to comment.