Merge pull request #14245 from silicons/sprint_staging
adds config entry for sprint removal that works prettier than just setting sprint speed to 0
This commit is contained in:
@@ -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)
|
||||
@@ -61,6 +63,8 @@
|
||||
update_sprint_icon()
|
||||
|
||||
/mob/living/proc/user_toggle_intentional_sprint_mode()
|
||||
if(!CONFIG_GET(flag/sprint_enabled))
|
||||
return
|
||||
var/old = (combat_flags & COMBAT_FLAG_SPRINT_TOGGLED)
|
||||
if(old)
|
||||
if(combat_flags & COMBAT_FLAG_SPRINT_FORCED)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user