From 3287f9189355f71d55a473096e94dfed4d108cb3 Mon Sep 17 00:00:00 2001 From: terkhen Date: Fri, 11 Jun 2010 20:30:12 +0000 Subject: (svn r19963) -Add: Stop a vehicle after it crashes or is destroyed. --- src/vehicle.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 7e97c465f..0c0e33a59 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -169,6 +169,8 @@ uint Vehicle::Crash(bool flooded) 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(); -- cgit v1.2.3-70-g09d2