Fixes problems with multiple sources of alpha on humans (#25884)

* lets gooooo

* this too

* comments

* update code

* im so good

* tested, it works now

* Update code/game/dna/mutations/mutation_powers.dm

Co-authored-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>
Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

---------

Signed-off-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: BiancaWilkson <42818125+BiancaWilkson@users.noreply.github.com>
This commit is contained in:
Contrabang
2024-09-26 18:06:44 +00:00
committed by GitHub
co-authored by BiancaWilkson
parent 5e3dad1289
commit ee6f73973e
11 changed files with 118 additions and 30 deletions
@@ -242,6 +242,9 @@
var/turf/turf_to_teleport_to = get_step(target, get_dir(source, M)) //get position relative to caster
if(!turf_to_teleport_to || is_blocked_turf(turf_to_teleport_to, TRUE))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.set_alpha_tracking(0, src, update_alpha = FALSE)
animate(M, alpha = 0, time = 2, easing = EASE_OUT) //fade out
sleep(1)
if(!M)
@@ -254,7 +257,12 @@
sleep(1)
if(!M)
return
animate(M, alpha = 255, time = 2, easing = EASE_IN) //fade IN
var/our_alpha = 255
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.set_alpha_tracking(ALPHA_VISIBLE, src, update_alpha = FALSE)
our_alpha = H.get_alpha()
animate(M, alpha = our_alpha, time = 2, easing = EASE_IN) //fade IN
sleep(1)
if(!M)
return