Pulling a human mob with a slowdown greater than yours now puts you to their speed. (#9674)

This commit is contained in:
Hockaa
2020-08-16 11:24:57 +01:00
committed by GitHub
parent 2517c32809
commit c82fe8a9ac
2 changed files with 17 additions and 2 deletions
@@ -4,6 +4,12 @@
if(species.slowdown)
tally = species.slowdown
if(ishuman(pulling))
var/mob/living/carbon/human/H = pulling
if(H.species.slowdown> species.slowdown)
tally = H.species.slowdown
tally += H.ClothesSlowdown()
if (istype(loc, /turf/space) || isopenturf(loc))
if(!(locate(/obj/structure/lattice, loc) || locate(/obj/structure/stairs, loc) || locate(/obj/structure/ladder, loc)))
return 0
@@ -17,8 +23,7 @@
if(can_feel_pain())
if(get_shock() >= 10) tally += (get_shock() / 10) //pain shouldn't slow you down if you can't even feel it
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head))
tally += I.slowdown
tally += ClothesSlowdown()
if(species)
tally += species.get_species_tally(src)
@@ -167,3 +172,7 @@
/mob/living/carbon/human/mob_negates_gravity()
return (shoes && shoes.negates_gravity())
/mob/living/carbon/human/proc/ClothesSlowdown()
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head, wear_mask, shoes, l_ear, r_ear, glasses, belt))
. += I.slowdown