mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Fixes a lot of procs not checking the return value of Life() when they should (#89542)
## About The Pull Request  Goal of this PR was to fix this annoying CI runtime that most likely occurs on a Life() tick that happens on a dead or deleted mob. Ending up finding more issues than I set out to fix. The short of it is: the base call of `Life()` actually has a return value of `1` if the mob is alive, or `null` if the mob is dead or qdeleted. There are many procs which should be stopping operations once the mob is either qdeleted or dead, but many procs were not even checking the return value of `..()`. This fixes that. Note: For some procs, it _DOES_ actually matter to differentiate between being qdeleted and being dead... `handle_organs()` comes to mind iirc. So I was careful to respect that. That is why some are checking for `!.` while others are checking for `QDELETED(src)` ## Why It's Good For The Game Less spurious runtimes. ## Changelog Not player facing --------- Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
committed by
Roxy
co-authored by
SyncIt21
SmArtKar
parent
2a88edf6a4
commit
69ece2c6ec
@@ -117,7 +117,9 @@
|
||||
|
||||
/mob/living/basic/pet/dog/breaddog/Life(seconds_per_tick = SSMOBS_DT, times_fired)
|
||||
. = ..()
|
||||
if(stat)
|
||||
if(!.) //dead or deleted
|
||||
return
|
||||
if(stat) // consciousness check
|
||||
return
|
||||
|
||||
if(health < maxHealth)
|
||||
|
||||
Reference in New Issue
Block a user