fix attack stamina cost check (#18872)

Co-authored-by: Errant <35878406+errant@users.noreply.github.com>
This commit is contained in:
Errant
2023-08-14 16:10:15 +00:00
committed by GitHub
parent 73386af66f
commit 7a702221ef

View File

@@ -249,8 +249,9 @@ public sealed partial class StaminaSystem : EntitySystem
/// </summary>
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))
return false;
return true;
var oldStam = component.StaminaDamage;