Adds movement intents

This commit is contained in:
Sam
2017-06-10 10:12:14 +01:00
parent 4d57fff5c9
commit 7cf499dcc1
22 changed files with 51 additions and 47 deletions
+2 -2
View File
@@ -70,11 +70,11 @@
// a reasonable approximation of movement speed
var/mob_speed = M.movement_delay()
switch(M.m_intent)
if("run")
if(MOVE_INTENT_RUN)
if(M.drowsyness > 0)
mob_speed += 6
mob_speed += config.run_speed - 1
if("walk")
if(MOVE_INTENT_WALK)
mob_speed += config.walk_speed - 1
mob_speed = BASE_MOVE_DELAY / max(1, BASE_MOVE_DELAY + mob_speed)
speed = min(speed + inertia * mob_speed, mob_speed)