src/ai/api/ai_object.hpp
branchnoai
changeset 9760 265fdd2130c3
parent 9695 708f1e3cc4c4
child 9814 be51ea0adc29
--- a/src/ai/api/ai_object.hpp	Mon Feb 25 09:23:53 2008 +0000
+++ b/src/ai/api/ai_object.hpp	Mon Feb 25 14:03:14 2008 +0000
@@ -27,6 +27,7 @@
 		AIObject *mode_instance;
 		uint delay;
 		CommandCost costs;
+		bool last_command_res;
 		VehicleID new_vehicle_id;
 		SignID new_sign_id;
 		void *event_data;
@@ -84,6 +85,11 @@
 	static uint GetDoCommandDelay();
 
 	/**
+	 * Get the latest result of a DoCommand.
+	 */
+	static bool GetLastCommandRes();
+
+	/**
 	 * Get the latest stored new_vehicle_id.
 	 */
 	static VehicleID GetNewVehicleID();
@@ -100,6 +106,12 @@
 
 public:
 	/**
+	 * Store the latest result of a DoCommand per player.
+	 * @note NEVER use this yourself in your AI!
+	 */
+	static void SetLastCommandRes(bool res);
+
+	/**
 	 * Store a new_vehicle_id per player.
 	 * @note NEVER use this yourself in your AI!
 	 */