(svn r19599) -Fix [FS#3751]: Vehicles with a weight of zero crashed the game when using realistic acceleration.
This commit is contained in:
@@ -80,7 +80,7 @@ void GroundVehicle<T, Type>::CargoChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Store consist weight in cache. */
|
/* 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). */
|
/* Now update vehicle power (tractive effort is dependent on weight). */
|
||||||
this->PowerChanged();
|
this->PowerChanged();
|
||||||
|
Reference in New Issue
Block a user