]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix gun cooldown timespan overflow exception (#28136)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sun, 19 May 2024 22:07:45 +0000 (10:07 +1200)
committerGitHub <noreply@github.com>
Sun, 19 May 2024 22:07:45 +0000 (16:07 -0600)
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.Interactions.cs

index 274828a20864bc2c267672ca8d99bde58c59f0d3..f3ff89a660e585081c0afc92a8d6c4ae101b18fc 100644 (file)
@@ -112,6 +112,12 @@ public abstract partial class SharedGunSystem
 
     private void OnGunSelected(EntityUid uid, GunComponent component, HandSelectedEvent args)
     {
+        if (Timing.ApplyingState)
+             return;
+
+        if (component.FireRateModified <= 0)
+            return;
+
         var fireDelay = 1f / component.FireRateModified;
         if (fireDelay.Equals(0f))
             return;