diff options
author | celestar <celestar@openttd.org> | 2005-02-17 10:56:19 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-02-17 10:56:19 +0000 |
commit | fe6f9e9a658be8198b3ee149d8f50c6e2900111d (patch) | |
tree | c51545fe02021db0bfb157ca313142d0813a3bdb /town_cmd.c | |
parent | 7678a937e4356b4b3b25290edd364877068db77e (diff) | |
download | openttd-fe6f9e9a658be8198b3ee149d8f50c6e2900111d.tar.xz |
(svn r1881) -Fix: [ 1119308 ] Max passengers / mail variables are now 32 bit
Diffstat (limited to 'town_cmd.c')
-rw-r--r-- | town_cmd.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/town_cmd.c b/town_cmd.c index 43cdd61f5..104f2ca06 100644 --- a/town_cmd.c +++ b/town_cmd.c @@ -898,7 +898,7 @@ restart: } } -static void UpdateTownMaxPass(Town *t) +void UpdateTownMaxPass(Town *t) { t->max_pass = t->population >> 3; t->max_mail = t->population >> 4; @@ -1926,14 +1926,23 @@ static const byte _town_desc[] = { // failed bribe attempts are stored since savegame format 4 SLE_CONDARR(Town,unwanted, SLE_INT8, 8, 4,255), - SLE_VAR(Town,max_pass, SLE_UINT16), - SLE_VAR(Town,max_mail, SLE_UINT16), - SLE_VAR(Town,new_max_pass,SLE_UINT16), - SLE_VAR(Town,new_max_mail,SLE_UINT16), - SLE_VAR(Town,act_pass, SLE_UINT16), - SLE_VAR(Town,act_mail, SLE_UINT16), - SLE_VAR(Town,new_act_pass,SLE_UINT16), - SLE_VAR(Town,new_act_mail,SLE_UINT16), + SLE_CONDVAR(Town,max_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,max_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,new_max_pass,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,new_max_mail,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,act_pass, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,act_mail, SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,new_act_pass,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + SLE_CONDVAR(Town,new_act_mail,SLE_FILE_U16 | SLE_VAR_U32, 0, 8), + + SLE_CONDVAR(Town,max_pass, SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,max_mail, SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,new_max_pass,SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,new_max_mail,SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,act_pass, SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,act_mail, SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,new_act_pass,SLE_UINT32, 9, 255), + SLE_CONDVAR(Town,new_act_mail,SLE_UINT32, 9, 255), SLE_VAR(Town,pct_pass_transported,SLE_UINT8), SLE_VAR(Town,pct_mail_transported,SLE_UINT8), |