From f83afe11f908472ed64f05a6f0b0f5aaaee28a9c Mon Sep 17 00:00:00 2001 From: LHoG <1476261+lhog@users.noreply.github.com> Date: Sun, 8 Dec 2024 22:31:08 +0100 Subject: [PATCH] Report "Waiting for game to start" for local games/demos/loads --- rts/Game/PreGame.cpp | 11 ++++++++--- rts/Menu/SelectMenu.cpp | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rts/Game/PreGame.cpp b/rts/Game/PreGame.cpp index 02e5c61d48..0ae97f11da 100644 --- a/rts/Game/PreGame.cpp +++ b/rts/Game/PreGame.cpp @@ -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"); } diff --git a/rts/Menu/SelectMenu.cpp b/rts/Menu/SelectMenu.cpp index d4012fb2af..0d5d85cab4 100644 --- a/rts/Menu/SelectMenu.cpp +++ b/rts/Menu/SelectMenu.cpp @@ -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));