Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incendiary grenades explode without fire #1427

Closed
TimGoll opened this issue Feb 19, 2024 · 0 comments · Fixed by #1544
Closed

Incendiary grenades explode without fire #1427

TimGoll opened this issue Feb 19, 2024 · 0 comments · Fixed by #1544
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@TimGoll
Copy link
Member

TimGoll commented Feb 19, 2024

This seems to be an issue in v0.12.x and v0.13.x. Maybe even earlier. At least from what I heard, it is to confirm if this issue existed before #1318.

When fire grenades explode next to a wall, they always spawn their fire particles behind the wall. This is confusing when there is a room next to it, but outright buggy, if there is nothing behind it because it makes the particles spawn really far out triggering the crazy physics tool that removes them completely.

@Histalek Histalek added the type/bug Something isn't working label Feb 25, 2024
@Histalek Histalek added this to the v0.13.xb milestone Feb 26, 2024
@TimGoll TimGoll self-assigned this Jun 1, 2024
TimGoll added a commit that referenced this issue Jun 2, 2024
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.
@Histalek Histalek modified the milestones: v0.13.3b, v0.14.0b Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants