Fix can't return to body bug (#4424)

This commit is contained in:
mirrorcult
2021-08-06 00:02:36 -07:00
committed by GitHub
parent db65ed5536
commit 09f5ec5cb8
6 changed files with 16 additions and 25 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using Content.Server.Ghost.Components;
using Content.Shared.Damage;
using Content.Shared.Damage.Components;
using Content.Shared.Ghost;
using Content.Shared.MobState;
using Content.Shared.Preferences;
using Robust.Server.Player;
@@ -75,7 +76,7 @@ namespace Content.Server.GameTicking.Presets
ghost.Name = mind.CharacterName ?? string.Empty;
var ghostComponent = ghost.GetComponent<GhostComponent>();
ghostComponent.CanReturnToBody = canReturn;
EntitySystem.Get<SharedGhostSystem>().SetCanReturnToBody(ghostComponent, canReturn);
if (canReturn)
mind.Visit(ghost);