StrataSource / FGD

The FGD + Hammer resource files for games built on Strata Source.
20 stars 15 forks source link

Fix trigger & teleport trigger spawnflags #33

Closed braem closed 3 years ago

braem commented 3 years ago

Closes https://github.com/ChaosInitiative/Chaos-FGD/issues/31

When I added momentum to the repo, I made a mistake with trigger spawnflags in general, mainly as I didn't understand the cases where spawnflags need to be "restored" if one of them differs (by number) from one of the bases: https://github.com/ChaosInitiative/Chaos-FGD/pull/15/commits/caf97de3a66a3e4ae477ed2eaa2f2ff4132b120c. This change fixes trigger & trigger_teleport spawnflags, while also defaulting Clients/Players spawnflag to on only for teleports.

Also, P2CE was not including trigger_teleport. This is because the parser can only parse one entity definition. The solution here is to have 2 empty BaseClass's basing off of different entities (Trigger vs. momentum's TeleTrigger). Only caveat is that it shows those bases in the FGD, though they aren't shown in hammer. This is done for some entities to account for different tags (see https://github.com/TeamSpen210/HammerAddons/blob/master/fgd/point/item/item_ammo_357.fgd).

The teleport FGDs are quite a mess at the moment, but will be remedied when we properly merge momentum's changes into the base engine.