refactor(update): cut over the frame orchestrator
Reduce GameWindow.OnUpdate to one typed orchestration call and remove transitive window callbacks from teardown, liveness, teleport placement, live presentation, auto-entry, and entity packet routing. Preserve the frozen retail object/network order while making the production owner graph explicit and testable.
This commit is contained in:
parent
947c61d2d7
commit
e91f310279
18 changed files with 864 additions and 348 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using AcDream.App.Interaction;
|
||||
using AcDream.App.Input;
|
||||
using AcDream.App.Physics;
|
||||
using AcDream.App.Rendering;
|
||||
using AcDream.App.Rendering.Vfx;
|
||||
|
|
@ -38,7 +39,7 @@ internal sealed class LiveEntityRuntimeTeardownController
|
|||
private readonly ShadowObjectRegistry? _shadows;
|
||||
private readonly LiveEntityLightController? _lights;
|
||||
private readonly EntityClassificationCache? _classification;
|
||||
private readonly Func<uint>? _playerGuid;
|
||||
private readonly ILocalPlayerIdentitySource? _identity;
|
||||
private readonly Func<LiveEntityRecord, LiveEntityTeardownPlan> _createPlan;
|
||||
private readonly Action<uint> _forgetUnknownOwner;
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ internal sealed class LiveEntityRuntimeTeardownController
|
|||
ShadowObjectRegistry shadows,
|
||||
LiveEntityLightController lights,
|
||||
EntityClassificationCache classification,
|
||||
Func<uint> playerGuid)
|
||||
ILocalPlayerIdentitySource identity)
|
||||
{
|
||||
_runtime = runtime ?? throw new ArgumentNullException(nameof(runtime));
|
||||
_presentation = presentation ?? throw new ArgumentNullException(nameof(presentation));
|
||||
|
|
@ -77,7 +78,7 @@ internal sealed class LiveEntityRuntimeTeardownController
|
|||
_lights = lights ?? throw new ArgumentNullException(nameof(lights));
|
||||
_classification = classification
|
||||
?? throw new ArgumentNullException(nameof(classification));
|
||||
_playerGuid = playerGuid ?? throw new ArgumentNullException(nameof(playerGuid));
|
||||
_identity = identity ?? throw new ArgumentNullException(nameof(identity));
|
||||
_createPlan = CreatePlan;
|
||||
_forgetUnknownOwner = effects.ForgetUnknownOwner;
|
||||
}
|
||||
|
|
@ -158,7 +159,7 @@ internal sealed class LiveEntityRuntimeTeardownController
|
|||
cleanups.Add(() => _translucencyFades!.ClearEntity(existingEntity.Id));
|
||||
cleanups.Add(() => _projectionWithdrawal!.LeaveWorld(
|
||||
record,
|
||||
_playerGuid!()));
|
||||
_identity!.ServerGuid));
|
||||
cleanups.Add(() => _children!.OnLogicalTeardown(record));
|
||||
cleanups.Add(() => _shadows!.Deregister(existingEntity.Id));
|
||||
cleanups.Add(() => _lights!.Forget(existingEntity.Id));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue