fix(touch): show the joystick and skill buttons only in the game phase
The controls keyed off CPythonBackground's warp map name, which the loading window sets before the game window exists, so the loading screen already showed them. Also require CPythonNetworkStream's phase to be "Game" (PORT_IsGamePhase, exposed as PythonBoot::InGamePhase). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5c8d583b31
commit
f9be09d2c2
@@ -306,6 +306,7 @@ int main(int argc, char** argv)
|
||||
py_true("isinstance(_stream.curPhaseWindow, introSelect.SelectCharacterWindow)"));
|
||||
});
|
||||
CHECK(selecting && !failed());
|
||||
CHECK(!PythonBoot::InGamePhase());
|
||||
if (!selecting)
|
||||
{
|
||||
// The login window reports failures in its popup (LOGIN_FAILURE, connect errors).
|
||||
@@ -392,6 +393,9 @@ int main(int argc, char** argv)
|
||||
});
|
||||
CHECK(loading && !failed());
|
||||
CHECK(py_true(loaded));
|
||||
// The loading window already warped the map; the touch host's joystick and skill buttons wait for
|
||||
// the game phase.
|
||||
CHECK(!PythonBoot::InGamePhase() && !PythonBoot::CurrentMapName().empty());
|
||||
|
||||
// 6. introLoading's update steps end in net.StartGame(); the next CPythonNetworkStream::Process calls
|
||||
// networkModule's SetGamePhase, which builds game.GameWindow (interfaceModule.MakeInterface) and
|
||||
@@ -402,6 +406,8 @@ int main(int argc, char** argv)
|
||||
return failed() || (py_true(gaming) && (!server || server->Has("game2:entergame")));
|
||||
});
|
||||
CHECK(entered && !failed());
|
||||
// CG_ENTERGAME's PHASE_GAME answer switches the stream to "Game" a round trip after the window opens.
|
||||
CHECK(pump_until(5, [] { return PythonBoot::InGamePhase(); }) && !PythonBoot::CurrentMapName().empty());
|
||||
|
||||
// 7. (批次 2V2-b) The server answers CG_ENTERGAME with the character's own insert packets and
|
||||
// PHASE_GAME, then the Entergame burst (PVP/land list, time, channel, greet chat, ...). GamePhase
|
||||
|
||||
Reference in New Issue
Block a user