]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix exception when telepad system plays beam animations (#33010)
authoreoineoineoin <helloworld@eoinrul.es>
Thu, 17 Apr 2025 11:52:38 +0000 (12:52 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Apr 2025 11:52:38 +0000 (21:52 +1000)
Fix exception when order sent to telepad

Co-authored-by: Milon <milonpl.git@proton.me>
Content.Client/Cargo/Systems/CargoSystem.Telepad.cs

index 312c4e8019a419c5927ccd52401a7d4aeeae401f..99f9b34387b37d4c901ce7ecccad6763b1982c5d 100644 (file)
@@ -75,10 +75,9 @@ public sealed partial class CargoSystem
         switch (state)
         {
             case CargoTelepadState.Teleporting:
-                if (_player.HasRunningAnimation(uid, TelepadBeamKey))
-                    return;
-                _player.Stop(uid, player, TelepadIdleKey);
-                _player.Play((uid, player), CargoTelepadBeamAnimation, TelepadBeamKey);
+                _player.Stop((uid, player), TelepadIdleKey);
+                if (!_player.HasRunningAnimation(uid, TelepadBeamKey))
+                    _player.Play((uid, player), CargoTelepadBeamAnimation, TelepadBeamKey);
                 break;
             case CargoTelepadState.Unpowered:
                 sprite.LayerSetVisible(CargoTelepadLayers.Beam, false);