(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 d308a41cef
commit c233dc08c1
1 changed files with 1 additions and 1 deletions

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();