You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Bartłomiej Dach
authored
Use placeholder user models in ranked play if online lookups fail (ppy#37455)
Suboptimal? Sure. But the primary goal is not to crash. Crashing is a
failure of the game programmer.
Better can be done later.
Remedies/fixesppy#37421.
AddStep("set play phase",()=>MultiplayerClient.RankedPlayChangeStage(RankedPlayStage.CardPlay, state =>state.ActiveUserId=API.LocalUser.Value.OnlineID).WaitSafely());
AddStep("set play phase",()=>MultiplayerClient.RankedPlayChangeStage(RankedPlayStage.CardPlay, state =>state.ActiveUserId=API.LocalUser.Value.OnlineID).WaitSafely());
126
160
AddUntilStep("wait until cards are present",()=>this.ChildrenOfType<PlayerHandOfCards.PlayerHandCard>().Count()==5);
127
161
@@ -153,6 +187,10 @@ public void TestPlayStage()
153
187
[Test]
154
188
publicvoidTestOtherPlaysCard()
155
189
{
190
+
AddStep("join other user",()=>MultiplayerClient.AddUser(newAPIUser{Id=2}));
AddStep("set play phase",()=>MultiplayerClient.RankedPlayChangeStage(RankedPlayStage.CardPlay, state =>state.ActiveUserId=2).WaitSafely());
170
212
AddWaitStep("wait",5);
171
213
AddStep("change player 1 health",()=>MultiplayerClient.RankedPlayChangeUserState(MultiplayerClient.LocalUser!.UserID, state =>state.Life=250_000).WaitSafely());
0 commit comments