summaryrefslogtreecommitdiff
path: root/variables.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-04 14:24:23 +0000
committertruelight <truelight@openttd.org>2005-02-04 14:24:23 +0000
commit99f3fe4c07f60416da4c9747bdc423db88211764 (patch)
tree9b5dccb928528ebebcb07c1edd681e786d4e0f9f /variables.h
parentc7eda1b15e7f10a405f398dd230cb8ccff8164b8 (diff)
downloadopenttd-99f3fe4c07f60416da4c9747bdc423db88211764.tar.xz
(svn r1786) -Fix: unitnumber is increased to 16bit, so now you can have up to 5000
trains in one game (instead of the 240 which was the current value). Default max allowed vehicles per type is changed: Trains: 500 (old 80) Road: 500 (old 80) Ships: 200 (old 40) Aicraft: 300 (old 50) (Tnx to Celestar and Darkvater for checking the patch)
Diffstat (limited to 'variables.h')
-rw-r--r--variables.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/variables.h b/variables.h
index 214406b26..69fab868b 100644
--- a/variables.h
+++ b/variables.h
@@ -11,6 +11,8 @@
# define MAX_PATH 260
#endif
+typedef uint16 UnitID; //! All unitnumber stuff is of this type (or anyway, should be)
+
// Prices and also the fractional part.
VARDEF Prices _price;
VARDEF uint16 _price_frac[NUM_PRICES];
@@ -135,10 +137,10 @@ typedef struct Patches {
uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right
uint8 window_snap_radius; // Windows snap at each other if closer than this
- byte max_trains; //max trains in game per player (these are 8bit because the unitnumber field can't hold more)
- byte max_roadveh; //max trucks in game per player
- byte max_aircraft; //max planes in game per player
- byte max_ships; //max ships in game per player
+ UnitID max_trains; //max trains in game per player (these are 16bit because the unitnumber field can't hold more)
+ UnitID max_roadveh; //max trucks in game per player
+ UnitID max_aircraft; //max planes in game per player
+ UnitID max_ships; //max ships in game per player
bool servint_ispercent; // service intervals are in percents
uint16 servint_trains; // service interval for trains