Treat triggers as SKIP, and treat aaa prefix as trigger in HL1 mode - #500
SirYodaJedi wants to merge 3 commits into
Conversation
|
I've been summoned to give my two cents on this as I have been the one complaining about this behaviour in the first place. This PR does two unrelated things:
Footnotes
|
I combined them because they're kinda intertwined. Both separately check texture names for triggers at different stages (it probably could be optimized to check once).
The tessellation doesn't occur if the texture is flagged as a trigger texture. EWT currently only considers the texture name I will push a commit later today to invert the behavior, though (I suppose
I could use strstr(), although that would probably be slower and would not work with Op4's variants. |
Huh, could've sworn it applied TEX_SPECIAL; guess I misread the code or I'm conflating it with something else. I'll look into that. |
Also treat `trigger` as a prefix for trigger textures, like with `aaa` in HL1 mode.
-nodrawtriggers, and treat aaa prefix as trigger in HL1 modeaaa prefix as trigger in HL1 mode
|
Whoop, I seem to have broken something; a regression test failed. Converted back to draft.
Made |


Reimplements trigger-related portions of #386 in slightly more backward-compatible ways.
triggernow acts as a prefix, allowing custom trigger textures named things such astrigger_hurtortrigger_tele.aaanow acts as a prefix for triggers in HL1 mode. The default trigger texture in GoldSrc isaaatrigger(see halflife.wad), and some games have additional textures such asaaa_hurtoraaa_push(see opfor.wad).Old Description
~~EWT applies TEX_SPECIAL for the `trigger` texture, unlike vanilla compilers. This saves lightmap usage (and speeds up compile times),~~ but it still counts towards vertex limits (particularly important for HL1, wherein vanilla BSP compatibility is expected, so BSP2 is a no-go). I've added a new QBSP arg, `-nodrawtriggers`, to treat triggers as if textured with SKIP. This definitely works in HL1 (it's default behavior in VHLT), and I don't see why it wouldn't work in Q1. I didn't make it default behavior because leaving the trigger model can be useful for map debugging in mods/engines that have a cvar to render triggers (but having the behavior inverted could make sense). I considered calling it `-skiptriggers`, to go with the usual nomenclature, but I was concerned that would sound like it was removing trigger entities. Feel free to rename it to something like `-triggers_as_skip` if you think that would be more suitable (current arg name is taken from VBSP).The standard trigger texture in Half-Life is
AAATRIGGER, however some games like Opposing Force and Condition Zero have addtional trigger textures for signifying different types of triggers, such asaaa_hurtfor trigger_hurt andaaa_pushfor trigger_push. As such, I've treatedaaaas a prefix for trigger textures, but only in HL1 mode (although if the ability to use multiple trigger textures for different trigger types is desired by Q1 mappers, this could be changed to be allowed with a QBSP arg).