ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
648 stars 75 forks source link

[TF2] [VScript] Expose UTIL_DecalTrace #6201

Open Marioiscool246 opened 3 months ago

Marioiscool246 commented 3 months ago

Title is self explanatory.

Tiagoquix commented 3 months ago

Out of curiosity, what would be the benefit of exposing it?

Marioiscool246 commented 3 months ago

Out of curiosity, what would be the benefit of exposing it?

One of my cases is that I have a script which spawns and fires explode on an env_explosion at the end of a trace from the player. The default implementation for the env_explosion's scorch decal is hardcoded to place the scorch decal below the explosion. This makes it so it only draws on floors but not walls or ceilings. Allowing me to manually draw a decal via vscript fixes this problem. I could think of other things that this could apply to for example properly drawing decals from lasers and stuff as tf2 for instance does not draw the correct one.