Fix ActionsSystem.IsCooldownActive always returning false if curTime is null (#39329)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user