From 545b6c5dec73d2db092202f2bd826b3c4bd24914 Mon Sep 17 00:00:00 2001 From: Drathek <76988376+Drulikar@users.noreply.github.com> Date: Tue, 26 Dec 2023 12:04:18 -0800 Subject: [PATCH] Fix xeno wounds layering over weeded xenos (#5289) # About the pull request This PR is a follow up to #5118 to fix the xeno wounds object appearing above their weeded appearance. It now synchronizes its plane and layer with the mob using vis_flags. # Explain why it's good for the game Fixes (defender near wall): ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/186acf03-c686-4114-9d53-c82687e0129c) Fixes (drone under door): ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/49301147-d1cd-49fc-b977-df2c446cdf45) # Testing Photographs and Procedure ![image](https://github.com/cmss13-devs/cmss13/assets/76988376/e5c4d69b-e9a3-429b-a2d5-e7a5915c5fee) # Changelog :cl: Drathek fix: Fix xeno wounds layering over weeds when merged with the weeds /:cl: --- code/modules/mob/living/carbon/xenomorph/update_icons.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/update_icons.dm b/code/modules/mob/living/carbon/xenomorph/update_icons.dm index aa6306849023..65795634a27c 100644 --- a/code/modules/mob/living/carbon/xenomorph/update_icons.dm +++ b/code/modules/mob/living/carbon/xenomorph/update_icons.dm @@ -301,7 +301,6 @@ return var/health_threshold - wound_icon_holder.layer = layer + 0.01 health_threshold = max(CEILING((health * 4) / (maxHealth), 1), 0) //From 0 to 4, in 25% chunks if(health > HEALTH_THRESHOLD_DEAD) if(health_threshold > 3) @@ -316,10 +315,9 @@ else wound_icon_holder.icon_state = handle_special_wound_states(health_threshold) - ///Used to display the xeno wounds/backpacks without rapidly switching overlays /atom/movable/vis_obj - vis_flags = VIS_INHERIT_ID|VIS_INHERIT_DIR + vis_flags = VIS_INHERIT_ID|VIS_INHERIT_DIR|VIS_INHERIT_LAYER|VIS_INHERIT_PLANE appearance_flags = RESET_COLOR /atom/movable/vis_obj/xeno_wounds