sprint updates

This commit is contained in:
silicons
2021-02-13 20:24:26 -07:00
parent 69e4f7ff84
commit 2ef33c5c88
10 changed files with 50 additions and 22 deletions
+2
View File
@@ -26,6 +26,8 @@
update_sprint_icon()
/mob/living/proc/enable_sprint_mode(update_icon = TRUE)
if(!CONFIG_GET(flag/sprint_enabled))
return
if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
return
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE)
@@ -1,4 +1,7 @@
/mob/living/silicon/robot/default_toggle_sprint(shutdown = FALSE)
if(!CONFIG_GET(flag/sprint_enabled))
disable_intentional_sprint_mode()
return
var/current = (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
if(current || shutdown || !cell || (cell.charge < 25) || !cansprint)
disable_intentional_sprint_mode()