Fix species with slowdown instead being super fast

This commit is contained in:
Aronai Sieyes
2020-05-07 00:18:54 -04:00
parent 63e112f1e2
commit 6213201ff2
3 changed files with 19 additions and 15 deletions

View File

@@ -2,22 +2,20 @@
/mob/living/carbon/human/movement_delay(oldloc, direct)
. = ..()
. = 0
if (istype(loc, /turf/space))
return ..() - 1
if(species.slowdown)
. = species.slowdown
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
. += species.slowdown
if(force_max_speed)
return HUMAN_LOWEST_SLOWDOWN
return ..() + HUMAN_LOWEST_SLOWDOWN
for(var/datum/modifier/M in modifiers)
if(!isnull(M.haste) && M.haste == TRUE)
return HUMAN_LOWEST_SLOWDOWN // Returning -1 will actually result in a slowdown for Teshari.
return ..() + HUMAN_LOWEST_SLOWDOWN // Returning -1 will actually result in a slowdown for Teshari.
if(!isnull(M.slowdown))
. += M.slowdown
@@ -96,6 +94,12 @@
. -= chem_effects[CE_SPEEDBOOST] // give 'em a buff on top.
. = max(HUMAN_LOWEST_SLOWDOWN, . + config.human_delay) // Minimum return should be the same as force_max_speed
. += ..()
/mob/living/carbon/human/Moved()
. = ..()
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
// This calculates the amount of slowdown to receive from items worn. This does NOT include species modifiers.
// It is in a seperate place to avoid an infinite loop situation with dragging mobs dragging each other.

View File

@@ -15,15 +15,15 @@
//No longer needed, but I'll leave it here incase we plan to re-use it.
/mob/living/silicon/robot/movement_delay()
. = ..()
. += speed
. = speed
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
. -= 3
. += config.robot_delay
. += ..()
// NEW: Use power while moving.
/mob/living/silicon/robot/SelfMove(turf/n, direct, movetime)
if (!is_component_functioning("actuator"))

View File

@@ -212,9 +212,7 @@
return ..()
*/
/mob/living/simple_mob/movement_delay()
. = ..()
. += movement_cooldown
. = movement_cooldown
if(force_max_speed)
return -3
@@ -243,6 +241,8 @@
. += config.animal_delay
. += ..()
/mob/living/simple_mob/Stat()
..()