@@ -33,59 +33,6 @@ public void Resync_SendsFullStateWhenKnownSeqEvictedFromRing()
3333 Assert . That ( msg . Message . PlayerStateFull . Sequence , Is . EqualTo ( RING_CAPACITY + 5 ) ) ;
3434 }
3535
36- [ Test ]
37- public void Resync_SendsTargetedDeltaWhenKnownSeqStillInRing ( )
38- {
39- SetVisibleSubjects ( ( subject , PeerViewSimulationTier . TIER_0 ) ) ;
40- simulation . SimulateTick ( peers , tickCounter : 0 ) ;
41- DrainAllMessages ( ) ; // PlayerJoined
42-
43- // Advance a few seqs — all still within ring capacity
44- PublishSnapshot ( subject , seq : 2 ) ;
45- PublishSnapshot ( subject , seq : 3 , position : new Vector3 ( 5f , 0f , 0f ) ) ;
46-
47- // Observer's known_seq is 1, which is still in the ring
48- AddResyncRequest ( observer , subject , knownSeq : 1 ) ;
49-
50- simulation . SimulateTick ( peers , tickCounter : 1 ) ;
51-
52- OutgoingMessage msg = DrainSingleMessage ( ) ;
53- Assert . That ( msg . To , Is . EqualTo ( observer ) ) ;
54- Assert . That ( msg . PacketMode , Is . EqualTo ( ITransport . PacketMode . RELIABLE ) ) ;
55- Assert . That ( msg . Message . MessageCase , Is . EqualTo ( ServerMessage . MessageOneofCase . PlayerStateDelta ) ) ;
56- Assert . That ( msg . Message . PlayerStateDelta . NewSeq , Is . EqualTo ( 3u ) ) ;
57- Assert . That ( msg . Message . PlayerStateDelta . PositionXQuantized , Is . EqualTo ( 5f ) ) ;
58- }
59-
60- [ Test ]
61- public void Resync_TargetedDeltaDiffsFromKnownSeqNotLastSent ( )
62- {
63- SetVisibleSubjects ( ( subject , PeerViewSimulationTier . TIER_0 ) ) ;
64- simulation . SimulateTick ( peers , tickCounter : 0 ) ;
65- DrainAllMessages ( ) ; // PlayerJoined at seq 1
66-
67- // Server sends a normal delta at seq 2 (position X=10)
68- PublishSnapshot ( subject , seq : 2 , position : new Vector3 ( 10f , 0f , 0f ) ) ;
69- simulation . SimulateTick ( peers , tickCounter : 1 ) ;
70- DrainAllMessages ( ) ; // delta seq 2, view baseline is now seq 2
71-
72- // Subject moves again to seq 3 (position X=10 unchanged, Y=5 changed)
73- PublishSnapshot ( subject , seq : 3 , position : new Vector3 ( 10f , 5f , 0f ) ) ;
74-
75- // Client says it's stuck at seq 1 (never got seq 2)
76- AddResyncRequest ( observer , subject , knownSeq : 1 ) ;
77-
78- simulation . SimulateTick ( peers , tickCounter : 2 ) ;
79-
80- OutgoingMessage msg = DrainSingleMessage ( ) ;
81- Assert . That ( msg . Message . MessageCase , Is . EqualTo ( ServerMessage . MessageOneofCase . PlayerStateDelta ) ) ;
82- Assert . That ( msg . Message . PlayerStateDelta . NewSeq , Is . EqualTo ( 3u ) ) ;
83-
84- // Diff is from seq 1 (Zero) to seq 3 — both X and Y changed
85- Assert . That ( msg . Message . PlayerStateDelta . PositionXQuantized , Is . EqualTo ( 10f ) ) ;
86- Assert . That ( msg . Message . PlayerStateDelta . PositionYQuantized , Is . EqualTo ( 5f ) ) ;
87- }
88-
8936 [ Test ]
9037 public void Resync_ViewBaselineAdvancesToCurrentAfterResync ( )
9138 {
@@ -149,29 +96,6 @@ public void Resync_LeftoversForInvisibleSubjectsClearedAfterTick()
14996 Assert . That ( peers [ observer ] . ResyncRequests , Is . Empty ) ;
15097 }
15198
152- [ Test ]
153- public void Resync_OnlyLatestKnownSeqKeptPerSubject ( )
154- {
155- SetVisibleSubjects ( ( subject , PeerViewSimulationTier . TIER_0 ) ) ;
156- simulation . SimulateTick ( peers , tickCounter : 0 ) ;
157- DrainAllMessages ( ) ;
158-
159- PublishSnapshot ( subject , seq : 2 , position : new Vector3 ( 1f , 0f , 0f ) ) ;
160- PublishSnapshot ( subject , seq : 3 , position : new Vector3 ( 2f , 0f , 0f ) ) ;
161-
162- // Client sends two resyncs — only the second should matter
163- AddResyncRequest ( observer , subject , knownSeq : 1 ) ;
164- AddResyncRequest ( observer , subject , knownSeq : 2 ) ;
165-
166- simulation . SimulateTick ( peers , tickCounter : 1 ) ;
167-
168- OutgoingMessage msg = DrainSingleMessage ( ) ;
169- Assert . That ( msg . Message . MessageCase , Is . EqualTo ( ServerMessage . MessageOneofCase . PlayerStateDelta ) ) ;
170-
171- // Diff is from seq 2 (X=1) to seq 3 (X=2), not from seq 1
172- Assert . That ( msg . Message . PlayerStateDelta . PositionXQuantized , Is . EqualTo ( 2f ) ) ;
173- }
174-
17599 [ Test ]
176100 public void Resync_NullResyncRequestsDoesNotCrash ( )
177101 {
0 commit comments