tf2classic / tf2classic-issue-tracker

For reporting bugs in Team Fortress 2 Classic.
11 stars 0 forks source link

trigger_catapult and trigger_add_tf_player_condition ignore filters and filtering spawnflags #320

Closed 111112oo closed 5 months ago

111112oo commented 5 months ago

As the title reads, trigger_catapult and trigger_add_tf_player_condition ignore filters and spawnflags. They will both act like the filter or flags aren't there and still apply their effect. This does not occur in live TF2. I do not know if there are more entities that are affected by this.

I have made 2 test maps to showcase this. Rename the .txt files to .vmf because vmfs are plaintext.

test_tf2cnoflagtriggers.txt In this map, there is a trigger_add_tf_player_condition, a trigger_catapult and a trigger_hurt from left to right, all of them have no spawnflags checked and therefore should work on nothing at all, because the spawnflags for almost every trigger are the same and determine what things can activate it. In TF2, all the triggers do not trigger as expected. In TF2C, the trigger_catapult and trigger_add_tf_player_condition somehow trigger, while the trigger_hurt remains untriggerable.

test_tf2cfilters.txt In this map, there is a column of RED filtered things to the left and BLUE filtered things to the right. From bottom to top they are a non-tf team filtered trigger_add_tf_playercondition then a tf team filtered one, then the same pattern again for triggercatapult, followed by a tf filtered trigger_hurt. In live TF2 all the RED filtered triggers only trigger for RED and the same for BLUE. While in TF2C, all the triggers except the trigger_hurts can be triggered by either team!

I found this while testing for https://github.com/tf2classic/tf2classic-issue-tracker/issues/160 where a name filtered and physics only flagged trigger_catapult was still catapulting me. But a dev told me the trigger_catapult is coded to only work for players currently, so the flag part is not a problem at all right now but will need addressing in the future or for potential other triggers with this issue. While the filters part absolutely is a big issue for compatability and new maps. I combined both here because the spawnflags for triggers are like filters of sorts.

azzyr commented 5 months ago

fixed filters in 2.1.4 -- trigger_add_tf_player_condition, trigger_remove_tf_player_condition, and trigger_catapult were all missing checks for filters, all of that has been addressed

as for physics objects and trigger_catapult, this entity was ported from momentum mod, the code is entirely different from tf2's, it was not written for non-player entities in mind. probably wontfix?

111112oo commented 5 months ago

Both issues confirmed fixed in 2.1.4!