Merge pull request #10648 from Citadel-Station-13/kevinz000-patch-19

Sprinting in general is now a config
This commit is contained in:
Ghom
2020-01-26 05:53:53 +01:00
committed by GitHub
5 changed files with 32 additions and 6 deletions
@@ -12,8 +12,11 @@
/mob/living/carbon/human/movement_delay()
. = 0
if(!resting && m_intent == MOVE_INTENT_RUN && !sprinting)
. += 1
if(!resting && m_intent == MOVE_INTENT_RUN && sprinting)
var/static/datum/config_entry/number/movedelay/sprint_speed_increase/SSI
if(!SSI)
SSI = CONFIG_GET_ENTRY(number/movedelay/sprint_speed_increase)
. -= SSI.config_entry_value
if(wrongdirmovedelay)
. += 1
. += ..()
@@ -17,6 +17,12 @@
var/sprint_stamina_cost = 0.70 //stamina loss per tile while insufficient sprint buffer.
//---End
/mob/living/update_config_movespeed()
. = ..()
sprint_buffer_max = CONFIG_GET(number/movedelay/sprint_buffer_max)
sprint_buffer_regen_ds = CONFIG_GET(number/movedelay/sprint_buffer_regen_per_ds)
sprint_stamina_cost = CONFIG_GET(number/movedelay/sprint_stamina_cost)
/mob/living/movement_delay(ignorewalk = 0)
. = ..()
if(resting)