From 0e8227020987bc3c255e5d5b36bfaa47a077d776 Mon Sep 17 00:00:00 2001 From: Vicacrov <49321394+Vicacrov@users.noreply.github.com> Date: Wed, 17 Jan 2024 22:33:45 +0100 Subject: [PATCH] Fixes facehuggers ghosting upon unsuccessful attachment (#5457) # About the pull request Fixes #5453 Adds an extra check to see if the player successfully attached to the person and only then ghosts them. # Explain why it's good for the game Removes a situation where a player might be ghosted out before actually becoming a facehugger mask (see the video on the issue report). # Testing Photographs and Procedure
Screenshots & Videos https://github.com/cmss13-devs/cmss13/assets/49321394/0bfc97ca-fffc-4805-b912-ad6a04f5ea17
# Changelog :cl: fix: Fixes an issue where player-controlled facehuggers would ghost out when smashing against anti-hugging headgear like the B18 helmet. /:cl: --- code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm index 25212718527b..32531e5325c6 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Facehugger.dm @@ -158,6 +158,9 @@ /mob/living/carbon/xenomorph/facehugger/proc/handle_hug(mob/living/carbon/human/human) var/obj/item/clothing/mask/facehugger/hugger = new /obj/item/clothing/mask/facehugger(loc, hivenumber) var/did_hug = hugger.attach(human, TRUE, 1, src) + if(!did_hug) + qdel(hugger) + return if(client) client.player_data?.adjust_stat(PLAYER_STAT_FACEHUGS, STAT_CATEGORY_XENO, 1) qdel(src)