diff options
author | rubidium <rubidium@openttd.org> | 2014-07-22 19:46:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-07-22 19:46:10 +0000 |
commit | f3d085e33c00d53ba8b16b45c5aec888bfb7b50c (patch) | |
tree | ca283f910ef0d043dafdada881b8ae6074130c0b /src/ground_vehicle.hpp | |
parent | a96a57e1619ff2cfc3f40508fca8418807669c7b (diff) | |
download | openttd-f3d085e33c00d53ba8b16b45c5aec888bfb7b50c.tar.xz |
(svn r26702) -Fix [FS#6067]: integer overflows in acceleration code causing either too low acceleration or too large acceleration
Diffstat (limited to 'src/ground_vehicle.hpp')
-rw-r--r-- | src/ground_vehicle.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp index 80a88b705..c38c6c4b7 100644 --- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -113,9 +113,9 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> { * Calculates the total slope resistance for this vehicle. * @return Slope resistance. */ - inline int32 GetSlopeResistance() const + inline int64 GetSlopeResistance() const { - int32 incl = 0; + int64 incl = 0; for (const T *u = T::From(this); u != NULL; u = u->Next()) { if (HasBit(u->gv_flags, GVF_GOINGUP_BIT)) { |