fix(phys): #111 - snap the player ENTITY at login entry, parity with the teleport-arrival path

The entry snap set only the controller (physics stood on the grounded floor)
while the renderer kept drawing the entity at the server-restored height -
the user's "spawned 2 meters in the air" screenshot over a fully-correct
interior. The teleport-arrival path already does entity.SetPosition +
ParentCellId (GameWindow.cs:4914); the login path now matches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-10 14:28:29 +02:00
parent 5706e0e10a
commit 2735695a6b

View file

@ -11496,6 +11496,14 @@ public sealed class GameWindow : IDisposable
playerEntity.Position, pinitCellId,
System.Numerics.Vector3.Zero, 100f);
_playerController.SetPosition(initResult.Position, initResult.CellId);
// #111 (2026-06-10): snap the ENTITY too — parity with the
// teleport-arrival path (entity.SetPosition + ParentCellId at
// GameWindow.cs:4914). Without this, the renderer keeps drawing the
// character at the server-restored position (ACE restored z=99.475;
// physics grounded to the 94.0 floor; the user saw the char floating
// 2 m up against the window while physics stood on the floor).
playerEntity.SetPosition(initResult.Position);
playerEntity.ParentCellId = initResult.CellId;
if (_animatedEntities.TryGetValue(playerEntity.Id, out var playerAE)
&& playerAE.Sequencer is { } playerSeq)