* combat refactoring * i hate this * mobility flags part 2 time xd * whew * stuff * a * ok * changes * Wew * k * add flags * FUCKYOUVORE * fixes * typo * no using this in hard stamcrit * update icon * woopsy * . = ..() * sigh * Update living_combat.dm * wew * wups * fix * i hate you * wrong button * k * ok * bet * k * Update code/modules/mob/living/living_combat.dm Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> * Update code/modules/mob/living/living_combat.dm Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> * Update code/modules/mob/living/living_combat.dm Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com> * early returns * skreee * agony * k * k * k * k * wack * compile * wack Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
19 lines
640 B
Plaintext
19 lines
640 B
Plaintext
/// Sprint buffer ///
|
|
/mob/living/carbon/doSprintLossTiles(tiles)
|
|
doSprintBufferRegen(FALSE) //first regen.
|
|
if(sprint_buffer)
|
|
var/use = min(tiles, sprint_buffer)
|
|
sprint_buffer -= use
|
|
tiles -= use
|
|
update_hud_sprint_bar()
|
|
if(!tiles) //we had enough, we're done!
|
|
return
|
|
adjustStaminaLoss(tiles * sprint_stamina_cost) //use stamina to cover deficit.
|
|
|
|
/mob/living/carbon/proc/doSprintBufferRegen(updating = TRUE)
|
|
var/diff = world.time - sprint_buffer_regen_last
|
|
sprint_buffer_regen_last = world.time
|
|
sprint_buffer = min(sprint_buffer_max, sprint_buffer + sprint_buffer_regen_ds * diff)
|
|
if(updating)
|
|
update_hud_sprint_bar()
|