Fix for death timer resetting after returning to body. (#5174)

This commit is contained in:
Matt
2021-11-11 11:17:23 -04:00
committed by GitHub
parent 1b01247c5f
commit 81dc92ce9b
3 changed files with 20 additions and 0 deletions

View File

@@ -83,6 +83,12 @@ namespace Content.Server.GameTicking.Presets
ghost.Name = mind.Session.Name;
var ghostComponent = ghost.GetComponent<GhostComponent>();
if (mind.TimeOfDeath.HasValue)
{
ghostComponent.TimeOfDeath = mind.TimeOfDeath!.Value;
}
EntitySystem.Get<SharedGhostSystem>().SetCanReturnToBody(ghostComponent, canReturn);
if (canReturn)