Fix exception when telepad system plays beam animations (#33010)

Fix exception when order sent to telepad

Co-authored-by: Milon <milonpl.git@proton.me>
This commit is contained in:
eoineoineoin
2025-04-17 12:52:38 +01:00
committed by GitHub
parent b1c1cb96b5
commit 05ae563e29

View 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);