Mercurial > hg > openttd
changeset 14988:c9420e63b763 draft
(svn r19599) -Fix [FS#3751]: Vehicles with a weight of zero crashed the game when using realistic acceleration.
author | terkhen <terkhen@openttd.org> |
---|---|
date | Sat, 10 Apr 2010 19:30:38 +0000 |
parents | b3433772b327 |
children | c3ef9eb70f13 |
files | src/ground_vehicle.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ground_vehicle.cpp +++ b/src/ground_vehicle.cpp @@ -80,7 +80,7 @@ } /* 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();