Skip to content

Commit

Permalink
Fixes Permanent Fire Visual Bug (#79326)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

There was a bug where the fire visual effect would remain even after the
fire status effect was removed. It happened most often with lava, but
apparently happened in some other circumstances too. I believe I have
tracked down and fixed all sources of the bug. The culprit was
`/mob/living/proc/update_fire`. It was searching for a base
`/datum/status_effect/fire_handler` status effect, when it should have
been looking for `/datum/status_effect/fire_handler/fire_stacks`. I
tested it with lava, and it fixed the bug. If anyone knows of a reliable
way to cause the bug without lava, I would be happy to test it there as
well. Closes #73283.

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:
fix: The fire visual on mobs should no longer persist after the fire has
been extinguished.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
GPeckman authored and Absolucy committed Feb 7, 2024
1 parent e276dbb commit 6fdf58f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1564,9 +1564,9 @@ GLOBAL_LIST_EMPTY(fire_appearances)
return fire_status.ignite(silent)

/mob/living/proc/update_fire()
var/datum/status_effect/fire_handler/fire_handler = has_status_effect(/datum/status_effect/fire_handler)
if(fire_handler)
fire_handler.update_overlay()
var/datum/status_effect/fire_handler/fire_stacks/fire_stacks = has_status_effect(/datum/status_effect/fire_handler/fire_stacks)
if(fire_stacks)
fire_stacks.update_overlay()

/**
* Extinguish all fire on the mob
Expand Down

0 comments on commit 6fdf58f

Please sign in to comment.