Mercurial > hg > openttd
changeset 15322:ff08f0eb701d draft
(svn r19963) -Add: Stop a vehicle after it crashes or is destroyed.
author | terkhen <terkhen@openttd.org> |
---|---|
date | Fri, 11 Jun 2010 20:30:12 +0000 |
parents | e02e72016811 |
children | 7ef84bf590b7 |
files | src/vehicle.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -169,6 +169,8 @@ assert(this->Previous() == NULL); // IsPrimaryVehicle fails for free-wagon-chains uint pass = 0; + /* Stop the vehicle. */ + if (this->IsPrimaryVehicle()) this->vehstatus |= VS_STOPPED; /* crash all wagons, and count passengers */ for (Vehicle *v = this; v != NULL; v = v->Next()) { if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo.Count();