Crawling Part 1: The Knockdownening (#36881)
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
committed by
GitHub
parent
cfb0a95035
commit
dec2d42a1d
@@ -234,7 +234,7 @@ public abstract partial class SharedStaminaSystem : EntitySystem
|
||||
/// <summary>
|
||||
/// Tries to take stamina damage without raising the entity over the crit threshold.
|
||||
/// </summary>
|
||||
public bool TryTakeStamina(EntityUid uid, float value, StaminaComponent? component = null, EntityUid? source = null, EntityUid? with = null)
|
||||
public bool TryTakeStamina(EntityUid uid, float value, StaminaComponent? component = null, EntityUid? source = null, EntityUid? with = null, bool visual = false)
|
||||
{
|
||||
// Something that has no Stamina component automatically passes stamina checks
|
||||
if (!Resolve(uid, ref component, false))
|
||||
@@ -242,10 +242,10 @@ public abstract partial class SharedStaminaSystem : EntitySystem
|
||||
|
||||
var oldStam = component.StaminaDamage;
|
||||
|
||||
if (oldStam + value > component.CritThreshold || component.Critical)
|
||||
if (oldStam + value >= component.CritThreshold || component.Critical)
|
||||
return false;
|
||||
|
||||
TakeStaminaDamage(uid, value, component, source, with, visual: false);
|
||||
TakeStaminaDamage(uid, value, component, source, with, visual: visual);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user