Movement delay fixes and optimization (#31037)

* Fixes simple animals occasionally moving too fast

* Removes a proc call from movement_delay
This commit is contained in:
Jordan Brown
2017-09-29 15:56:02 +13:00
committed by oranges
parent c0f02b0bb8
commit 3fb882895c
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -460,7 +460,7 @@
makeTrail(newloc, T, old_direction)
/mob/living/movement_delay(ignorewalk = 0)
. = ..()
. = 0
if(isopenturf(loc) && !is_flying())
var/turf/open/T = loc
. += T.slowdown
@@ -266,14 +266,11 @@
/mob/living/simple_animal/movement_delay()
. = ..()
. = speed
var/static/config_animal_delay
if(isnull(config_animal_delay))
config_animal_delay = CONFIG_GET(number/animal_delay)
. += config_animal_delay
return ..() + speed + config_animal_delay
/mob/living/simple_animal/Stat()
..()
+1 -1
View File
@@ -161,7 +161,7 @@
for(var/mob/M in get_hearers_in_view(range, src))
M.show_message( message, 2, deaf_message, 1)
/mob/proc/movement_delay()
/mob/proc/movement_delay() //update /living/movement_delay() if you change this
return 0
/mob/proc/Life()