From b9c894b717ae350bfeaa388b20c6b346edd71bf8 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 5 May 2024 20:17:26 +0200 Subject: [PATCH] Fix: for GUI network servers, name the first company the same as any other company --- src/network/network.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network/network.cpp b/src/network/network.cpp index 899d2a7396..b37b1aaf68 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1005,6 +1005,12 @@ void NetworkOnGameStart() NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER); if (c != nullptr && ci != nullptr) { ci->client_playas = c->index; + + /* + * If the company has not been named yet, the company was just started. + * Otherwise it would have gotten a name already, so announce it as a new company. + */ + if (c->name_1 == STR_SV_UNNAMED && c->name.empty()) NetworkServerNewCompany(c, ci); } ShowClientList();