]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix ActionsSystem.IsCooldownActive always returning false if curTime is null (#39329)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Sat, 2 Aug 2025 22:59:48 +0000 (15:59 -0700)
committerGitHub <noreply@github.com>
Sat, 2 Aug 2025 22:59:48 +0000 (00:59 +0200)
Content.Shared/Actions/SharedActionsSystem.cs

index 69b15235c4cea2dec31fe7c14015b426043e6a15..c4581cfbffb561d31c9b8c216d7f2286e0e09ac4 100644 (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;
     }