Makes sprinting stamloss make sense by making sprinting take no stamloss in no gravity or when being pulled

This commit is contained in:
deathride58
2019-03-15 20:25:44 -04:00
parent ccca2ac8a8
commit dcea7886d8
@@ -4,7 +4,7 @@
/mob/living/carbon/human/Move(NewLoc, direct)
var/oldpseudoheight = pseudo_z_axis
. = ..()
if(. && sprinting && !(movement_type & FLYING) && canmove && !resting && m_intent == MOVE_INTENT_RUN)
if(. && sprinting && !(movement_type & FLYING) && canmove && !resting && m_intent == MOVE_INTENT_RUN && has_gravity(loc) && !pulledby)
adjustStaminaLossBuffered(0.3)
if((oldpseudoheight - pseudo_z_axis) >= 8)
to_chat(src, "<span class='warning'>You trip off of the elevated surface!</span>")