@@ -76,6 +76,7 @@ public abstract partial class SpectatorClient : Component, ISpectatorClient
76
76
77
77
private IBeatmap ? currentBeatmap ;
78
78
private Score ? currentScore ;
79
+ private long ? currentScoreToken ;
79
80
80
81
private readonly Queue < FrameDataBundle > pendingFrameBundles = new Queue < FrameDataBundle > ( ) ;
81
82
@@ -108,7 +109,7 @@ private void load()
108
109
// re-send state in case it wasn't received
109
110
if ( IsPlaying )
110
111
// TODO: this is likely sent out of order after a reconnect scenario. needs further consideration.
111
- BeginPlayingInternal ( currentState ) ;
112
+ BeginPlayingInternal ( currentScoreToken , currentState ) ;
112
113
}
113
114
else
114
115
{
@@ -159,7 +160,7 @@ Task ISpectatorClient.UserSentFrames(int userId, FrameDataBundle data)
159
160
return Task . CompletedTask ;
160
161
}
161
162
162
- public void BeginPlaying ( GameplayState state , Score score )
163
+ public void BeginPlaying ( long ? scoreToken , GameplayState state , Score score )
163
164
{
164
165
// This schedule is only here to match the one below in `EndPlaying`.
165
166
Schedule ( ( ) =>
@@ -178,8 +179,9 @@ public void BeginPlaying(GameplayState state, Score score)
178
179
179
180
currentBeatmap = state . Beatmap ;
180
181
currentScore = score ;
182
+ currentScoreToken = scoreToken ;
181
183
182
- BeginPlayingInternal ( currentState ) ;
184
+ BeginPlayingInternal ( currentScoreToken , currentState ) ;
183
185
} ) ;
184
186
}
185
187
@@ -264,7 +266,7 @@ public void StopWatchingUser(int userId)
264
266
} ) ;
265
267
}
266
268
267
- protected abstract Task BeginPlayingInternal ( SpectatorState state ) ;
269
+ protected abstract Task BeginPlayingInternal ( long ? scoreToken , SpectatorState state ) ;
268
270
269
271
protected abstract Task SendFramesInternal ( FrameDataBundle bundle ) ;
270
272
0 commit comments