Skip to content

Commit

Permalink
Fix suiciding ghost player bodies duplicating (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy authored Dec 16, 2024
1 parent 563fe62 commit 8a3d8f5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions monkestation/code/modules/ghost_players/ghost_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
if(. && stat > SOFT_CRIT)
life_or_death()

/mob/living/carbon/human/ghost/proc/disolve_ghost()
/mob/living/carbon/human/ghost/final_checkout(obj/item/suicide_tool, apply_damage)
dissolve_and_ghost()

/mob/living/carbon/human/ghost/proc/dissolve_and_ghost()
var/mob/dead/observer/new_ghost = ghostize(can_reenter_corpse = FALSE)
if(!QDELETED(new_ghost))
new_ghost.key = old_key
Expand All @@ -64,7 +67,7 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
if(dueling)
linked_button?.end_duel(src)
if(QDELING(src) || QDELETED(client) || client.is_afk())
disolve_ghost()
dissolve_and_ghost()
else
move_to_ghostspawn()
revive(full_heal_flags = ADMIN_HEAL_ALL)
Expand All @@ -88,7 +91,7 @@ GLOBAL_VAR_INIT(disable_ghost_spawning, FALSE)
return
if(living_owner.revive_prepped)
return TRUE
living_owner.disolve_ghost()
living_owner.dissolve_and_ghost()
return TRUE


Expand Down

0 comments on commit 8a3d8f5

Please sign in to comment.