Skip to content

Commit

Permalink
Fix xeno wounds layering over weeded xenos (#5289)
Browse files Browse the repository at this point in the history
# 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:
  • Loading branch information
Drulikar committed Dec 26, 2023
1 parent 48aca72 commit 545b6c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/modules/mob/living/carbon/xenomorph/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 545b6c5

Please sign in to comment.