From 9d999ff5cffc33a5b85b9a6ee6d5a2939fd5430b Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 6 Sep 2021 19:34:05 -0700 Subject: [PATCH 1/2] Update _movespeed_modifier.dm --- code/modules/movespeed/_movespeed_modifier.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/movespeed/_movespeed_modifier.dm b/code/modules/movespeed/_movespeed_modifier.dm index 5c4bf2ed64..3f2969b582 100644 --- a/code/modules/movespeed/_movespeed_modifier.dm +++ b/code/modules/movespeed/_movespeed_modifier.dm @@ -66,8 +66,10 @@ Key procs if(!complex_calculation || (multiplicative_slowdown > 0)) // we aren't limiting how much things can slowdown.. yet. return existing + multiplicative_slowdown var/current_tiles = 10 / max(existing, world.tick_lag) - var/minimum_speed = 10 / min(current_tiles + max_tiles_per_second_boost, max(current_tiles, absolute_max_tiles_per_second)) - return max(minimum_speed, existing + multiplicative_slowdown) + // multiplicative_slowdown is negative due to our first check + var/max_buff_to = max(existing + multiplicative_slowdown, 10 / absolute_max_tiles_per_second, 10 / (current_tiles + max_tiles_per_second_boos)) + // never slow the user + return min(existing, max_buff_to) GLOBAL_LIST_EMPTY(movespeed_modification_cache) From 7013958961c993bc40bcc178b6e252cd2b87b0c2 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Mon, 6 Sep 2021 19:43:51 -0700 Subject: [PATCH 2/2] Update _movespeed_modifier.dm --- code/modules/movespeed/_movespeed_modifier.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/movespeed/_movespeed_modifier.dm b/code/modules/movespeed/_movespeed_modifier.dm index 3f2969b582..54991af932 100644 --- a/code/modules/movespeed/_movespeed_modifier.dm +++ b/code/modules/movespeed/_movespeed_modifier.dm @@ -67,7 +67,7 @@ Key procs return existing + multiplicative_slowdown var/current_tiles = 10 / max(existing, world.tick_lag) // multiplicative_slowdown is negative due to our first check - var/max_buff_to = max(existing + multiplicative_slowdown, 10 / absolute_max_tiles_per_second, 10 / (current_tiles + max_tiles_per_second_boos)) + var/max_buff_to = max(existing + multiplicative_slowdown, 10 / absolute_max_tiles_per_second, 10 / (current_tiles + max_tiles_per_second_boost)) // never slow the user return min(existing, max_buff_to)