Skip to content

Commit 3af7acc

Browse files
committed
fix spectator remote player query
1 parent b015d0d commit 3af7acc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Backdash/Session/Backends/LocalSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ SessionServices<TInput> services
5555
this.options = options;
5656
}
5757

58-
public void Dispose() => tsc.SetCanceled();
58+
public void Dispose() => tsc.TrySetCanceled();
5959

6060
public async ValueTask DisposeAsync() => await WaitUntilFinish();
6161

src/Backdash/Session/Backends/SpectatorSession.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,4 +388,10 @@ bool IProtocolInputEventPublisher<ConfirmedInputs<TInput>>.Publish(in GameInputE
388388
host.SetLocalFrameNumber(input.Frame, FixedFrameRate);
389389
return host.SendInputAck();
390390
}
391+
392+
bool INetcodeSession.TryGetRemotePlayer([NotNullWhen(true)] out NetcodePlayer? player)
393+
{
394+
player = host.Player;
395+
return true;
396+
}
391397
}

0 commit comments

Comments
 (0)