(svn r13554) [NoAI] -Fix (r13553): do compile the right directory before commiting... otherwise you'll end up with committing compile errors :( noai
authorrubidium
Tue, 17 Jun 2008 21:44:41 +0000
branchnoai
changeset 11000 51305152af09
parent 10999 f238f608f45c
child 11001 716595242a19
(svn r13554) [NoAI] -Fix (r13553): do compile the right directory before commiting... otherwise you'll end up with committing compile errors :(
src/ai/api/ai_vehicle.cpp
src/ai/api/ai_vehicle.hpp
--- a/src/ai/api/ai_vehicle.cpp	Tue Jun 17 21:35:32 2008 +0000
+++ b/src/ai/api/ai_vehicle.cpp	Tue Jun 17 21:44:41 2008 +0000
@@ -200,7 +200,7 @@
 	byte vehstatus = v->vehstatus;
 
 	if (vehstatus & ::VS_CRASHED) return AIVehicle::VS_CRASHED;
-	if (vehstatus & ::VS_BROKEN) return AIVehicle::VS_BROKEN;
+	if (v->breakdown_ctr != 0) return AIVehicle::VS_BROKEN;
 	if (v->IsStoppedInDepot()) return AIVehicle::VS_IN_DEPOT;
 	if (vehstatus & ::VS_STOPPED) return AIVehicle::VS_STOPPED;
 	if (v->current_order.IsType(OT_LOADING)) return AIVehicle::VS_AT_STATION;
--- a/src/ai/api/ai_vehicle.hpp	Tue Jun 17 21:35:32 2008 +0000
+++ b/src/ai/api/ai_vehicle.hpp	Tue Jun 17 21:44:41 2008 +0000
@@ -78,7 +78,7 @@
 	 * The different states a vehicle can be in.
 	 */
 	enum VehicleState {
-		VS_RUNNING         //!< The vehicle is currently running.
+		VS_RUNNING,        //!< The vehicle is currently running.
 		VS_STOPPED,        //!< The vehicle is stopped manually.
 		VS_IN_DEPOT,       //!< The vehicle is stopped in the depot.
 		VS_AT_STATION,     //!< The vehicle is stopped at a station and is currently loading or unloading.