summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/players.cpp')
-rw-r--r--src/players.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 68dc68b8e..6842fa04b 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -455,6 +455,12 @@ void ResetPlayerLivery(Player *p)
}
}
+/**
+ * Create a new player and sets all player variables default values
+ *
+ * @param is_ai is a ai player?
+ * @return the player struct
+ */
Player *DoStartupNewPlayer(bool is_ai)
{
Player *p;
@@ -478,7 +484,7 @@ Player *DoStartupNewPlayer(bool is_ai)
p->avail_railtypes = GetPlayerRailtypes(p->index);
p->avail_roadtypes = GetPlayerRoadtypes(p->index);
p->inaugurated_year = _cur_year;
- p->face = ConvertFromOldPlayerFace(Random());
+ RandomPlayerFaceBits(p->face, (GenderEthnicity)Random(), false); // create a random player face
/* Engine renewal settings */
p->engine_renew_list = NULL;