Spec changing while having wings now works properly (#46787)

This commit is contained in:
nemvar
2019-10-01 08:55:20 +02:00
committed by AnturK
parent 81a48545cb
commit fe63359a5c
@@ -343,8 +343,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
fly.Remove(C)
QDEL_NULL(fly)
if(C.movement_type & FLYING)
C.setMovetype(C.movement_type & ~FLYING)
ToggleFlight(C,0)
ToggleFlight(C)
if(C.dna && C.dna.species && (C.dna.features["wings"] == wings_icon))
if("wings" in C.dna.species.mutant_bodyparts)
C.dna.species.mutant_bodyparts -= "wings"
@@ -1814,7 +1813,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/spec_stun(mob/living/carbon/human/H,amount)
if(flying_species && H.movement_type & FLYING)
ToggleFlight(H,0)
ToggleFlight(H)
flyslip(H)
. = stunmod * H.physiology.stun_mod * amount
@@ -1865,7 +1864,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/HandleFlight(mob/living/carbon/human/H)
if(H.movement_type & FLYING)
if(!CanFly(H))
ToggleFlight(H,0)
ToggleFlight(H)
return FALSE
return TRUE
else