From c3e820165bd92f1ec70df339ddd1685f16ba0744 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Thu, 7 May 2020 00:18:54 -0400 Subject: [PATCH] Fix species with slowdown instead being super fast --- .../mob/living/carbon/human/human_movement.dm | 22 +++++++++++-------- .../living/silicon/robot/robot_movement.dm | 6 ++--- .../mob/living/simple_mob/simple_mob.dm | 6 ++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 41887f801bb..cd2d368d6d2 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -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 @@ -114,6 +112,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. diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index 7b268993fa2..77e0f0cbe96 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -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)) . -= 2 // VOREStation Edit . += config.robot_delay + . += ..() + // NEW: Use power while moving. /mob/living/silicon/robot/SelfMove(turf/n, direct) if (!is_component_functioning("actuator")) diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm index be70f6edd02..3b063e1ac47 100644 --- a/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/code/modules/mob/living/simple_mob/simple_mob.dm @@ -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() ..()