fortressforever-2013 / fortressforever-src

A port of Fortress Forever, a Team Fortress mod on Source Engine SDK 2013 (SDK2013CE)
https://www.fortress-forever.com/
Other
6 stars 6 forks source link

Triggers by the same name fire output from all the triggers even if only a single trigger is triggered #34

Closed YoYo178 closed 3 months ago

YoYo178 commented 3 months ago

This issue is caused because of the way CBaseEntityOutput::FireOutput works, it queues the output to CEventQueue by the CEventQueue::AddEvent method but passes the entity's name instead of the entity itself, which makes it call all the entities which share the exact same name.

In order to fix this one must simply apply conditional checks just before the g_EventQueue.AddEvent calls in CBaseEntityOutput::FireOutput to check if pCaller is a trigger and if pCaller's name is the same as ev.m_iTarget, if true, then pass the entity itself otherwise pass the entity's name.

azzyr commented 3 months ago

this is intended behaviour and fix caused crashes, reopened

will make it an option with keyfields