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:
Erik 2026-07-22 03:31:38 +02:00
parent 947c61d2d7
commit e91f310279
18 changed files with 864 additions and 348 deletions

View file

@ -0,0 +1,43 @@
using AcDream.App.Input;
using AcDream.App.Net;
namespace AcDream.App.World;
internal interface IAcceptedLocalPhysicsTimestampPublisher
{
void Publish(uint serverGuid, AcceptedPhysicsTimestamps timestamps);
}
/// <summary>
/// Publishes accepted local-player physics timestamps to the current exact
/// session without retaining the window host.
/// </summary>
internal sealed class LiveSessionLocalPhysicsTimestampPublisher
: IAcceptedLocalPhysicsTimestampPublisher
{
private readonly ILocalPlayerIdentitySource _identity;
private readonly ILiveWorldSessionSource _session;
public LiveSessionLocalPhysicsTimestampPublisher(
ILocalPlayerIdentitySource identity,
ILiveWorldSessionSource session)
{
_identity = identity ?? throw new ArgumentNullException(nameof(identity));
_session = session ?? throw new ArgumentNullException(nameof(session));
}
public void Publish(uint serverGuid, AcceptedPhysicsTimestamps timestamps)
{
if (serverGuid != _identity.ServerGuid
|| _session.CurrentSession is not { } session)
{
return;
}
session.PublishAcceptedLocalPhysicsTimestamps(
timestamps.Instance,
timestamps.ServerControlledMove,
timestamps.Teleport,
timestamps.ForcePosition);
}
}