-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incendiary: Fixed explosion sometimes missing fire (#1544)
Fixes #1427 This pullrequests fixes the issue with incediaries not spawning fire particles (or spawning them in the next room if there is any) when exploding close to a wall. The relevant change for this fix is in the base grenade file: ![image](https://github.com/TTT-2/TTT2/assets/13639408/64c9b037-0143-4c20-9164-ecc40e8fbf98) This is not a TTT2 issue, it also [exists in vanilla TTT](https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/entities/ttt_basegrenade_proj.lua#L54). The issue exists because the trace, that should detect the ground, does not ignore the grenade itself and returns therefore a kind of random HitNormal. Since the grenade is then moved along the normal prior to explosion, this often resulted in the grenade being behing a wall and therefore not spawning any particles. Adding `self` to the filter would fix this issue as well, but after some quick thought I decided that `MASK_SOLID_BRUSHONLY` would be a fitting mask setting here. [[docs]](https://wiki.facepunch.com/gmod/Enums/MASK). This issue probably existed with ALL GRENADES that inherited from the weapon base. I wonder why nobody besides me ever reported this. Probably because you do not notice it during normal chaotic gameplay. Besides this change I also renamed some variables to be more in-line with our style, while also moving the fire grenade decal creation to the server. That way the decal spawns together with the explosion and not a few moments before. It looks cleaner that way.
- Loading branch information
Showing
4 changed files
with
74 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters