U_I Phase 2.5: Fix *swish deleting tail overlay

All more cases of "don't call apply/remove multiple times!
This commit is contained in:
Leshana
2018-03-08 19:34:01 -05:00
committed by Arokha Sieyes
parent 306a484b48
commit 4c5b7655b5
3 changed files with 8 additions and 10 deletions
+2 -2
View File
@@ -104,8 +104,8 @@
base_icon = 'icons/turf/flooring/asteroid.dmi'
initial_flooring = null
/turf/simulated/floor/holofloor/desert/New()
..()
/turf/simulated/floor/holofloor/desert/initialize()
. = ..()
if(prob(10))
add_overlay("asteroid[rand(0,9)]")
@@ -835,16 +835,12 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
if(tail_overlay && tail_overlay.icon_state == t_state)
return //let the existing animation finish
remove_layer(TAIL_LAYER)
tail_overlay = set_tail_state(t_state)
tail_overlay = set_tail_state(t_state) // Calls remove_layer & apply_layer
if(tail_overlay)
spawn(20)
//check that the animation hasn't changed in the meantime
if(overlays_standing[TAIL_LAYER] == tail_overlay && tail_overlay.icon_state == t_state)
animate_tail_stop()
apply_layer(TAIL_LAYER)
animate_tail_stop()
/mob/living/carbon/human/proc/animate_tail_start()
if(QDESTROYING(src))