From 1119bc01cff342e1e69191742badbfd691a9af97 Mon Sep 17 00:00:00 2001 From: Cojoke <83733158+Cojoke-dot@users.noreply.github.com> Date: Sun, 21 Jul 2024 05:46:33 -0500 Subject: [PATCH] Prevent Dragon Body from Despawning (#29842) * 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Dragon/DragonSystem.cs b/Content.Server/Dragon/DragonSystem.cs index 1f15def5ce..29875c60ca 100644 --- a/Content.Server/Dragon/DragonSystem.cs +++ b/Content.Server/Dragon/DragonSystem.cs @@ -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 _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) -- 2.51.2