diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 1dadda6..656ff93 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -899,6 +899,12 @@ public sealed class GameWindow : IDisposable _animatedEntities.Remove(existingEntity.Id); // Physics collision registry entry is keyed by local id too. _physicsEngine.ShadowObjects.Deregister(existingEntity.Id); + // Dead-reckon state is keyed by SERVER guid (not local id) so we + // clear using the same guid the new spawn will use. Leaving old + // SnapResidual / DeadReckonedPos in would make the next first + // UpdatePosition look like a 2m-residual soft-snap. + _remoteDeadReckon.Remove(spawn.Guid); + _remoteLastMove.Remove(spawn.Guid); } // Log every spawn that arrives so we can inventory what the server