Fix ActionsSystem.IsCooldownActive always returning false if curTime is null (#39329)

This commit is contained in:
DrSmugleaf
2025-08-02 15:59:48 -07:00
committed by GitHub
parent 615f63e13b
commit 21eb662377

View File

@@ -1022,6 +1022,7 @@ public abstract class SharedActionsSystem : EntitySystem
public bool IsCooldownActive(ActionComponent action, TimeSpan? curTime = null)
{
// TODO: Check for charge recovery timer
curTime ??= GameTiming.CurTime;
return action.Cooldown.HasValue && action.Cooldown.Value.End > curTime;
}