Skip to content

Commit 03b46ab

Browse files
authored
Fix ghost time of death (space-wizards#43411)
* Use RealTime when setting ghost TimeOfDeath * Don't pause with RealTime * Oops. Also get rid of AutoGenerateComponentPause
1 parent 74c8fdd commit 03b46ab

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Content.Server/Ghost/GhostSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private void OnGhostStartup(EntityUid uid, GhostComponent component, ComponentSt
205205
}
206206

207207
_eye.RefreshVisibilityMask(uid);
208-
var time = _gameTiming.CurTime;
208+
var time = _gameTiming.RealTime;
209209
component.TimeOfDeath = time;
210210
}
211211

Content.Shared/Ghost/GhostComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Content.Shared.Ghost;
1010
/// Handles limiting interactions, using ghost abilities, ghost visibility, and ghost warping.
1111
/// </summary>
1212
[RegisterComponent, NetworkedComponent, Access(typeof(SharedGhostSystem))]
13-
[AutoGenerateComponentState(true), AutoGenerateComponentPause]
13+
[AutoGenerateComponentState(true)]
1414
public sealed partial class GhostComponent : Component
1515
{
1616
// Actions
@@ -54,7 +54,7 @@ public sealed partial class GhostComponent : Component
5454
/// May not reflect actual time of death if this entity has been paused,
5555
/// but will give an accurate length of time <i>since</i> death.
5656
/// </remarks>
57-
[DataField, AutoPausedField]
57+
[DataField]
5858
public TimeSpan TimeOfDeath = TimeSpan.Zero;
5959

6060
/// <summary>

0 commit comments

Comments
 (0)