Fix #10154: Don't inconsistently set random company face in network games

(cherry picked from commit 638b75d4763a412085157eea7e09e9d74db268cd)
pull/451/head
Tyler Trahan 2 years ago committed by Jonathan G Rennison
parent 3176313576
commit 1e0d5998db

@ -586,8 +586,8 @@ Company *DoStartupNewCompany(DoStartupNewCompanyFlag flags, CompanyID company)
c->inaugurated_year = _cur_year;
/* If starting a player company in singleplayer and a favorite company manager face is selected, choose it. Otherwise, use a random face.
* In a network game, we'll choose the favorite face later in CmdCompanyCtrl to sync it to all clients, but we choose it here for the first (host) company. */
if (_company_manager_face != 0 && !is_ai) {
* In a network game, we'll choose the favorite face later in CmdCompanyCtrl to sync it to all clients. */
if (_company_manager_face != 0 && !is_ai && !_networking) {
c->face = _company_manager_face;
} else {
RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false, false);

Loading…
Cancel
Save