]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Prevent Dragon Body from Despawning (#29842)
authorCojoke <83733158+Cojoke-dot@users.noreply.github.com>
Sun, 21 Jul 2024 10:46:33 +0000 (05:46 -0500)
committerGitHub <noreply@github.com>
Sun, 21 Jul 2024 10:46:33 +0000 (20:46 +1000)
* Prevent Dragon Body from Despawning + Make Dragon Unrevivable

* Requested changes

* Meh, nobody wanted this anyways and it was not really an issue

Content.Server/Dragon/DragonSystem.cs

index 1f15def5ce5a9b36e485d7ab64b528afdaa6284d..29875c60ca7ae21728f334257ce603da6ff2a9af 100644 (file)
@@ -8,6 +8,7 @@ using Content.Shared.Maps;
 using Content.Shared.Mind;
 using Content.Shared.Mind.Components;
 using Content.Shared.Mobs;
+using Content.Shared.Mobs.Systems;
 using Content.Shared.Movement.Systems;
 using Content.Shared.NPC.Systems;
 using Content.Shared.Zombies;
@@ -27,6 +28,7 @@ public sealed partial class DragonSystem : EntitySystem
     [Dependency] private readonly SharedActionsSystem _actions = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly SharedTransformSystem _transform = default!;
+    [Dependency] private readonly MobStateSystem _mobState = default!;
 
     private EntityQuery<CarpRiftsConditionComponent> _objQuery;
 
@@ -91,7 +93,8 @@ public sealed partial class DragonSystem : EntitySystem
                 }
             }
 
-            comp.RiftAccumulator += frameTime;
+            if (!_mobState.IsDead(uid))
+                comp.RiftAccumulator += frameTime;
 
             // Delete it, naughty dragon!
             if (comp.RiftAccumulator >= comp.RiftMaxAccumulator)