Bandaid for zombie decap runtiming (#92055)

## About The Pull Request

Fixes #89823

Sort of

The species is changed in decapitation, which goes something like this:
- Decapitate
  - Remove the organs
    -  Change the species, and thus change the head
- Finish decapitaiton, but we now have a different head???
- The world is burning the world is burning the world is burning

I cheated by using a 0 time addtimer to move the species change to the
end of the callstack. This fixes most interactions, but doesn't fix
removing the tumor from the seperated head, which will just leave it as
a zombie head.

I'm not sure how we'd change the organ removal pipeline to prevent this
from happening. Ideally zombies stop being a race and then this wouldn't
be an issue

## Changelog
🆑
runtime: Fixes zombie decap regrowing the persons head
/🆑
This commit is contained in:
Time-Green
2025-07-19 20:29:25 -04:00
committed by Roxy
parent fa5bfcc481
commit 75fc4ede34
+3 -1
View File
@@ -36,7 +36,9 @@
. = ..()
STOP_PROCESSING(SSobj, src)
if(iszombie(new_owner) && old_species && !special)
new_owner.set_species(old_species)
// There isn't a clean way to change species during organ or bodypart removals. In lieau of a beter solution, this will do
spawn(0)
new_owner.set_species(old_species)
if(timer_id)
deltimer(timer_id)
UnregisterSignal(new_owner, COMSIG_LIVING_DEATH)