feat(app): add client/server CLI arguments and init guards

This commit is contained in:
2026-06-26 13:48:07 +08:00
parent fbb6fe2fa6
commit 3c14a4ffe1
16 changed files with 164 additions and 39 deletions

View File

@@ -200,6 +200,9 @@ void ClientWorld::init(std::string_view player_name,
LoginReq req;
req.set_name(m_player.get_name());
while (!client->is_connected()) {
if (client->is_connect_error()) {
throw std::runtime_error("Can't connect to the server");
}
std::this_thread::sleep_for(milliseconds(200));
}
// request login