Skip to content

Commit

Permalink
Fix: for GUI network servers, name the first company the same as any …
Browse files Browse the repository at this point in the history
…other company
  • Loading branch information
rubidium42 committed May 5, 2024
1 parent a245e96 commit 4d169a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/network/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4d169a6

Please sign in to comment.