(svn r26702) -Fix [FS#6067]: integer overflows in acceleration code causing either too low acceleration or too large acceleration

This commit is contained in:
rubidium
2014-07-22 19:46:10 +00:00
parent a96a57e161
commit f3d085e33c
2 changed files with 26 additions and 9 deletions

View File

@@ -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)) {