From: eoineoineoin Date: Thu, 17 Apr 2025 11:52:38 +0000 (+0100) Subject: Fix exception when telepad system plays beam animations (#33010) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=05ae563e29d53a857188e429357d2908894d2037;p=space-station-14.git Fix exception when telepad system plays beam animations (#33010) Fix exception when order sent to telepad Co-authored-by: Milon --- diff --git a/Content.Client/Cargo/Systems/CargoSystem.Telepad.cs b/Content.Client/Cargo/Systems/CargoSystem.Telepad.cs index 312c4e8019..99f9b34387 100644 --- a/Content.Client/Cargo/Systems/CargoSystem.Telepad.cs +++ b/Content.Client/Cargo/Systems/CargoSystem.Telepad.cs @@ -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);