You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SUB_UseTargets is called from a touch context, meaning "other" is guaranteed to be assigned, but there's no guarantee about the "activator" global.
Also, it's not clear to me why multi_trigger is assigned to self.use before SUB_UseTargets is called when multi_trigger calls SUB_UseTargets itself. Seems like a bug, but you're doing something I just don't understand.
The text was updated successfully, but these errors were encountered:
I had to dig through some Discord responses to recall what happened
Sometimes, a message from a trigger appears in the top left corner started with (centerprint), instead of in the center. What gives? (tested in ironwail and remaster)
Seems sometimes a non-player entity is found as the "activator" of trigger_look causing the centerprint text to be logged as a broadcast (bprint) message
I also wanted to highlight that the code identified is unusual b/c the function multi_trigger calls SUB_UseTargets
A possible fix is to replace
self.use = multi_trigger;
SUB_UseTargets();
with
self.enemy = other;
multi_trigger();
multi_trigger sets activator to self.enemy, so the "touch-er" other needs to be assigned to self.enemy
=====
In short:
When trigger_look is set to print a message (or trigger an entity that prints a message?), it doesn't know which player to apply the centerprint on
progs_dump/qc/triggers.qc
Lines 1249 to 1250 in 55960e8
SUB_UseTargets is called from a touch context, meaning "other" is guaranteed to be assigned, but there's no guarantee about the "activator" global.
Also, it's not clear to me why
multi_trigger
is assigned toself.use
beforeSUB_UseTargets
is called whenmulti_trigger
callsSUB_UseTargets
itself. Seems like a bug, but you're doing something I just don't understand.The text was updated successfully, but these errors were encountered: