summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-11-27 21:14:19 +0000
committerpeter1138 <peter1138@openttd.org>2006-11-27 21:14:19 +0000
commit45e7e61aa969764dc71ab1bbc574655e07a346a4 (patch)
treecd41f901ff9432fe8e37e87a0dfb34aadfb8f6d3 /vehicle.h
parent2f0bdeefb9a3a5cfe8f3e78f64c94b8a25936e58 (diff)
downloadopenttd-45e7e61aa969764dc71ab1bbc574655e07a346a4.tar.xz
(svn r7268) -Codechange: change rail vehicle cached weight from 16 to 32 bit values to avoid possible overflows.
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/vehicle.h b/vehicle.h
index 7681b9de9..b4e1a7190 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -54,8 +54,8 @@ typedef struct VehicleRail {
uint16 cached_total_length; ///< Length of the whole train, valid only for first engine.
// cached values, recalculated when the cargo on a train changes (in addition to the conditions above)
- uint16 cached_weight; // total weight of the consist.
- uint16 cached_veh_weight; // weight of the vehicle.
+ uint32 cached_weight; // total weight of the consist.
+ uint32 cached_veh_weight; // weight of the vehicle.
/**
* Position/type of visual effect.
* bit 0 - 3 = position of effect relative to vehicle. (0 = front, 8 = centre, 15 = rear)