fix(streaming): player entity no longer disappears on landblock unload
ROOT CAUSE: MarkPersistent(chosen.Id) stored the SERVER GUID (e.g. 0x5000000A) but RemoveLandblock checked entity.Id which is the LOCAL sequential counter (e.g. 42). Different number spaces → never matched → persistent rescue never triggered → player entity lost on unload. Fix: - Added WorldEntity.ServerGuid field (0 for dat-hydrated scenery) - Live entity spawn sets ServerGuid = spawn.Guid - RemoveLandblock checks entity.ServerGuid against _persistentGuids - MarkPersistent still stores the server GUID (correct) This bug has been reported across multiple sessions as "character disappears when walking far." The neverCullLandblockId fix only prevented frustum culling but didn't prevent the entity from being removed from the render list entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
adf626367e
commit
c32cef7e87
3 changed files with 8 additions and 1 deletions
|
|
@ -767,6 +767,7 @@ public sealed class GameWindow : IDisposable
|
|||
var entity = new AcDream.Core.World.WorldEntity
|
||||
{
|
||||
Id = _liveEntityIdCounter++,
|
||||
ServerGuid = spawn.Guid,
|
||||
SourceGfxObjOrSetupId = spawn.SetupTableId.Value,
|
||||
Position = worldPos,
|
||||
Rotation = rot,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue