Skip to content

Commit

Permalink
Report "Waiting for game to start" for local games/demos/loads
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Dec 8, 2024
1 parent 02df97e commit f83afe1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions rts/Game/PreGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,15 @@ bool CPreGame::Draw()
font->SetTextColor(color.x, color.y, color.z, color.w);

if (!clientNet->Connected()) {
if (clientSetup->isHost)
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for server to start");
else
if (clientSetup->isHost) {
if (clientSetup->hostIP == "localhost")
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for game to start");
else
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for server to start");
}
else {
font->glFormat(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Connecting to server (%ds)", (spring_gettime() - connectTimer).toSecsi());
}
} else {
font->glPrint(0.5f, 0.60f, 2.0f, FONT_CENTER | FONT_SCALE | FONT_NORM, "Waiting for server response");
}
Expand Down
1 change: 0 additions & 1 deletion rts/Menu/SelectMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ void SelectMenu::Single()
selw->userScript.clear();

pregame = new CPreGame(clientSetup);
auto f = &CPreGame::LoadSetupScript;
pregame->AsyncExecute(&CPreGame::LoadSetupScript, StartScriptGen::CreateDefaultSetup(selw->userMap, selw->userMod, selw->userScript, clientSetup->myPlayerName));
//pregame->LoadSetupScript(StartScriptGen::CreateDefaultSetup(selw->userMap, selw->userMod, selw->userScript, clientSetup->myPlayerName));
return (agui::gui->RmElement(this));
Expand Down

0 comments on commit f83afe1

Please sign in to comment.