fixes
This commit is contained in:
@@ -808,7 +808,7 @@
|
||||
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
|
||||
|
||||
hud_used.staminas?.update_icon_state()
|
||||
hud_used.staminabuffer?.update_icon()
|
||||
hud_used.staminabuffer?.mark_dirty()
|
||||
|
||||
/mob/living/carbon/human/fully_heal(admin_revive = FALSE)
|
||||
if(admin_revive)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
buckle_lying = FALSE
|
||||
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
|
||||
/// Enable stamina combat
|
||||
combat_flags = COMBAT_FLAGS_DEFAULT | COMBAT_FLAG_UNARMED_PARRY
|
||||
combat_flags = COMBAT_FLAGS_STAMINA_COMBAT | COMBAT_FLAG_UNARMED_PARRY
|
||||
status_flags = CANSTUN|CANKNOCKDOWN|CANUNCONSCIOUS|CANPUSH|CANSTAGGER
|
||||
has_field_of_vision = FALSE //Handled by species.
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
return
|
||||
return FALSE
|
||||
stamina_buffer -= amount
|
||||
UpdateStaminaBuffer()
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
@@ -22,12 +23,16 @@
|
||||
var/time = world.time - stamina_buffer_regen_last
|
||||
var/missing_stamina_percent = getStaminaLoss() / STAMINA_CRIT
|
||||
var/stamina_buffer_max = src.stamina_buffer_max * (1 - (missing_stamina_percent * STAMINA_BUFFER_STAMCRIT_CAPACITY_PERCENT_PENALTY))
|
||||
stamina_buffer_regen_last = world.time
|
||||
if(stamina_buffer > stamina_buffer_max)
|
||||
stamina_buffer = stamina_buffer_max
|
||||
return
|
||||
var/combat_mode = !SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE)
|
||||
stamina_buffer += min((stamina_buffer_max - stamina_buffer), (1 - (missing_stamina_percent * STAMINA_BUFFER_STAMCRIT_REGEN_PERCENT_PENALTY)) * (time * 0.1 * ((combat_mode? stamina_buffer_regen_combat : stamina_buffer_regen) * stamina_buffer_regen_mod)))
|
||||
hud_used?.staminabuffer?.update_icon()
|
||||
var/action_penalty = (((world.time - last_action) >= STAMINA_BUFFER_ACTION_PENALTY_TIME) && STAMINA_BUFFER_ACTION_PENALTY_FACTOR) || 1
|
||||
var/stamina_penalty = 1 - (missing_stamina_perent * STAMINA_BUFFER_STAMCRIT_REGEN_PERCENT_PENALTY)
|
||||
var/regen = (time * 0.1 * ((combat_mode? stamina_buffer_regen_combat : stamina_buffer_regen) * stamina_buffer_regen_mod)
|
||||
stamina_buffer += min((stamina_buffer_max - stamina_buffer), action_penalty * stamina_penalty * regen))
|
||||
hud_used?.staminabuffer?.mark_dirty()
|
||||
|
||||
/**
|
||||
* Boosts our stamina buffer by this much.
|
||||
@@ -36,3 +41,4 @@
|
||||
var/missing_stamina_percent = getStaminaLoss() / STAMINA_CRIT
|
||||
var/stamina_buffer_max = src.stamina_buffer_max * (1 - (missing_stamina_percent * STAMINA_BUFFER_STAMCRIT_CAPACITY_PERCENT_PENALTY))
|
||||
stamina_buffer += min(amount, stamina_buffer_max - stamina_buffer)
|
||||
hud_used?.staminabuffer?.mark_dirty()
|
||||
|
||||
@@ -65,7 +65,7 @@ Key procs
|
||||
/datum/movespeed_modifier/proc/apply_multiplicative(existing, mob/target)
|
||||
if(!complex_calculation || (multiplicative_slowdown > 0)) // we aren't limiting how much things can slowdown.. yet.
|
||||
return existing + multiplicative_slowdown
|
||||
var/current_tiles = 10 / existing
|
||||
var/current_tiles = 10 / max(existing, world.tick_lag)
|
||||
var/minimum_speed = 10 / min(current_tiles + max_tiles_per_second_boost, max(current_tiles, absolute_max_tiles_per_second))
|
||||
return max(minimum_speed, existing + multiplicative_slowdown)
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
/datum/movespeed_modifier/sprinting
|
||||
flags = IGNORE_NOSLOW
|
||||
blacklisted_movetypes = FLOATING
|
||||
priority = -100
|
||||
priority = 100
|
||||
|
||||
/// for speed reasons this is sorta copypasty.
|
||||
/datum/movespeed_modifier/sprinting/apply_multiplicative(existing, mob/target)
|
||||
@@ -135,16 +135,15 @@
|
||||
var/mob/living/L = target
|
||||
if(!(L.mobility_flags & MOBILITY_STAND))
|
||||
return
|
||||
var/static/datum/config_entry/number/movedelay/sprint_max_tiles_increase/SSMTI
|
||||
if(!SSMTI)
|
||||
SSMTI = CONFIG_GET_ENTRY(number/movedelay/sprint_max_tiles_increase)
|
||||
var/static/datum/config_entry/number/movedelay/sprint_max_tiles_increase/SMTI
|
||||
if(!SMTI)
|
||||
SMTI = CONFIG_GET_ENTRY(number/movedelay/sprint_max_tiles_increase)
|
||||
var/static/datum/config_entry/number/movedelay/sprint_speed_increase/SSI
|
||||
if(!SSI)
|
||||
SSI = CONFIG_GET_ENTRY(number/movedelay/sprint_speed_increase)
|
||||
var/static/datum/config_entry/number/movedelay/sprint_absolute_max_tiles/SAMT
|
||||
if(!SAMT)
|
||||
SAMT = CONFIG_GET_ENTRY(number/movedelay/sprint_absolute_max_tiles)
|
||||
var/current_tiles = 10 / existing
|
||||
var/minimum_speed = 10 / min(SAMT.config_entry_value, ((current_tiles) + SSMTI.config_entry_value))
|
||||
. = max(minimum_speed, (existing - SSI.config_entry_value))
|
||||
|
||||
var/current_tiles = 10 / max(existing, world.tick_lag)
|
||||
var/minimum_speed = 10 / min(max(SAMT.config_entry_value, current_tiles), current_tiles + SMTI.config_entry_value)
|
||||
. = min(., max(minimum_speed, existing - SSI.config_entry_value))
|
||||
|
||||
Reference in New Issue
Block a user