(svn r19599) -Fix [FS#3751]: Vehicles with a weight of zero crashed the game when using realistic acceleration.

This commit is contained in:
terkhen
2010-04-10 19:30:38 +00:00
parent 53ca62da90
commit a3fdb26bee

View File

@@ -80,7 +80,7 @@ void GroundVehicle<T, Type>::CargoChanged()
}
/* Store consist weight in cache. */
this->acc_cache.cached_weight = weight;
this->acc_cache.cached_weight = max<uint32>(1, weight);
/* Now update vehicle power (tractive effort is dependent on weight). */
this->PowerChanged();