summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-08-20 18:40:57 +0000
committerrubidium <rubidium@openttd.org>2006-08-20 18:40:57 +0000
commit28a08437075be6495df383ca854f6026965a8b8e (patch)
tree146ad5e3c72a49bcc04fae58e750b972f063d8c2 /players.c
parent5e4667624e5093ea2b83bcdf63d836d1a34d46bc (diff)
downloadopenttd-28a08437075be6495df383ca854f6026965a8b8e.tar.xz
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
The game date subsystem now allows someone to start in the year 0 and continue up to the year 5 000 000. However, you currently cannot build anything before 1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
Diffstat (limited to 'players.c')
-rw-r--r--players.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/players.c b/players.c
index d27477c4d..ccfa4b773 100644
--- a/players.c
+++ b/players.c
@@ -490,7 +490,7 @@ Player *DoStartupNewPlayer(bool is_ai)
p->share_owners[0] = p->share_owners[1] = p->share_owners[2] = p->share_owners[3] = OWNER_SPECTATOR;
p->avail_railtypes = GetPlayerRailtypes(p->index);
- p->inaugurated_year = _cur_year - BASE_YEAR;
+ p->inaugurated_year = _cur_year;
p->face = Random();
/* Engine renewal settings */
@@ -1132,7 +1132,8 @@ static const SaveLoad _player_desc[] = {
SLE_CONDVAR(Player, location_of_house, SLE_UINT32, 6, SL_MAX_VERSION),
SLE_CONDVAR(Player, last_build_coordinate, SLE_FILE_U16 | SLE_VAR_U32, 0, 5),
SLE_CONDVAR(Player, last_build_coordinate, SLE_UINT32, 6, SL_MAX_VERSION),
- SLE_VAR(Player,inaugurated_year,SLE_UINT8),
+ SLE_CONDVAR(Player, inaugurated_year, SLE_FILE_U8 | SLE_VAR_I32, 0, 30),
+ SLE_CONDVAR(Player, inaugurated_year, SLE_INT32, 31, SL_MAX_VERSION),
SLE_ARR(Player,share_owners, SLE_UINT8, 4),