fix attack stamina cost check (#18872)
Co-authored-by: Errant <35878406+errant@users.noreply.github.com>
This commit is contained in:
@@ -249,8 +249,9 @@ public sealed partial class StaminaSystem : EntitySystem
|
|||||||
/// </summary>
|
/// </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)
|
||||||
{
|
{
|
||||||
|
// Something that has no Stamina component automatically passes stamina checks
|
||||||
if (!Resolve(uid, ref component, false))
|
if (!Resolve(uid, ref component, false))
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
var oldStam = component.StaminaDamage;
|
var oldStam = component.StaminaDamage;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user