From b6f001b300a88aff0bc13372b5c1dbc2002954f8 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 12 Jul 2026 13:13:24 +0100 Subject: [PATCH] Remove receipt-driven snapshot reconciliation --- .../Runtime/EveUnityPlayableWorldLiveClient.cs | 13 +------------ .../Editor/EveUnitySceneSurfaceLowererTests.cs | 8 +++----- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/org.gamecult.eve.unity-scene/Runtime/EveUnityPlayableWorldLiveClient.cs b/packages/org.gamecult.eve.unity-scene/Runtime/EveUnityPlayableWorldLiveClient.cs index 4c7eebb..bf44ee2 100644 --- a/packages/org.gamecult.eve.unity-scene/Runtime/EveUnityPlayableWorldLiveClient.cs +++ b/packages/org.gamecult.eve.unity-scene/Runtime/EveUnityPlayableWorldLiveClient.cs @@ -11,7 +11,6 @@ namespace GameCult.Eve.UnityScene private readonly EveUnitySceneProviderConnection _connection; private readonly EveUnityPlayableWorldPresenter _presenter; private readonly IEveUnitySceneCommandReceiptSource? _receiptSource; - private readonly bool _refreshOnTerminalReceipt; private readonly EveUnityFeedbackPresenter _feedback = new EveUnityFeedbackPresenter(); private readonly EveUnityShotReceiptPresenter _shots = new EveUnityShotReceiptPresenter(); private readonly List _pendingReceipts = @@ -22,13 +21,11 @@ namespace GameCult.Eve.UnityScene public EveUnityPlayableWorldLiveClient( EveUnitySceneProviderConnection connection, EveUnityPlayableWorldPresenter presenter, - IEveUnitySceneCommandReceiptSource? receiptSource = null, - bool refreshOnTerminalReceipt = true) + IEveUnitySceneCommandReceiptSource? receiptSource = null) { _connection = connection ?? throw new ArgumentNullException(nameof(connection)); _presenter = presenter ?? throw new ArgumentNullException(nameof(presenter)); _receiptSource = receiptSource; - _refreshOnTerminalReceipt = refreshOnTerminalReceipt; } public EveUnitySceneProjection? ActiveProjection => _connection.ActiveProjection; @@ -173,17 +170,9 @@ namespace GameCult.Eve.UnityScene if (receipt.SourceVersion > ActiveVersion) { _pendingReceipts.Add(receipt); - if (_refreshOnTerminalReceipt && receipt.ShouldRefreshProviderSurface) - { - Refresh(); - PublishReceiptsWhoseStateIsVisible(); - } return; } - if (_refreshOnTerminalReceipt && receipt.ShouldRefreshProviderSurface) - Refresh(); - PublishReceipt(receipt); } diff --git a/packages/org.gamecult.eve.unity-scene/Tests/Editor/EveUnitySceneSurfaceLowererTests.cs b/packages/org.gamecult.eve.unity-scene/Tests/Editor/EveUnitySceneSurfaceLowererTests.cs index 131d941..10db12d 100644 --- a/packages/org.gamecult.eve.unity-scene/Tests/Editor/EveUnitySceneSurfaceLowererTests.cs +++ b/packages/org.gamecult.eve.unity-scene/Tests/Editor/EveUnitySceneSurfaceLowererTests.cs @@ -491,7 +491,7 @@ namespace GameCult.Eve.UnityScene.Tests Assert.That(runtime.LastReceipt, Is.Not.Null); Assert.That(runtime.LastReceipt!.IsProviderOwned, Is.True); - Assert.That(transport.RefreshCount, Is.EqualTo(1)); + Assert.That(transport.RefreshCount, Is.EqualTo(0)); } [Test] @@ -886,7 +886,7 @@ namespace GameCult.Eve.UnityScene.Tests } [Test] - public void LivePlayableWorldClientRefreshesFromProviderSnapshotAfterReceiptWithoutOwningMovement() + public void LivePlayableWorldClientWaitsForProviderSurfaceUpdateAfterReceipt() { var source = new FakeProviderSurfaceSource( "aetheria", @@ -943,13 +943,11 @@ namespace GameCult.Eve.UnityScene.Tests Assert.That(client.LastReceipt.State, Is.EqualTo("pending")); Assert.That(client.ActiveVersion, Is.EqualTo(1)); - source.Stage(new EveUnitySceneProviderSurfaceSnapshot( + source.Publish(new EveUnitySceneProviderSurfaceSnapshot( PlayableArpgDocument(includeRaider: false, playerPosition: "30,0,30"), Advertisement("aetheria.daemon.game"), "cultmesh://aetheria/eve/surfaces/aetheria.daemon.game", 2)); - client.Refresh(); - Assert.That(client.LastReceipt.State, Is.EqualTo("reconciled")); Assert.That(client.ActiveVersion, Is.EqualTo(2)); Assert.That(client.LastPresentation, Is.Not.Null);