mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r19599) -Fix [FS#3751]: Vehicles with a weight of zero crashed the game when using realistic acceleration.
This commit is contained in:
parent
d308a41cef
commit
c233dc08c1
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user