summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-10-15 19:59:27 +0000
committerrubidium <rubidium@openttd.org>2007-10-15 19:59:27 +0000
commit322746ee11100a78e110d97b37c22d87452f8bff (patch)
tree601eba06fa5b573918e61db14239d9e0335bd237 /src/players.cpp
parenta1e1d8536193d1d3eba46077b55b119eda3d8823 (diff)
downloadopenttd-322746ee11100a78e110d97b37c22d87452f8bff.tar.xz
(svn r11269) -Feature: user customisable faces. Patch by BigBB.
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;