diff options
author | rubidium <rubidium@openttd.org> | 2007-10-15 19:59:27 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-10-15 19:59:27 +0000 |
commit | 5164e5741626bb18727a7078a079ba265fec3430 (patch) | |
tree | 601eba06fa5b573918e61db14239d9e0335bd237 /src/players.cpp | |
parent | 1280c7636db841d2a7e79f819aedfbfd83f87e6f (diff) | |
download | openttd-5164e5741626bb18727a7078a079ba265fec3430.tar.xz |
(svn r11269) -Feature: user customisable faces. Patch by BigBB.
Diffstat (limited to 'src/players.cpp')
-rw-r--r-- | src/players.cpp | 8 |
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; |