summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-04-25 22:57:15 +0000
committeryexo <yexo@openttd.org>2009-04-25 22:57:15 +0000
commit486e5b4bfeb4916f0a285fb9749ba031fa16c278 (patch)
treea0ce3752e54913433aff01ff7f74d0bf417b5548 /src/ai
parentd8bc98d5de40fe7549aa5815d71ddd00bf4ce7c5 (diff)
downloadopenttd-486e5b4bfeb4916f0a285fb9749ba031fa16c278.tar.xz
(svn r16150) -Fix [NoAI]: Change WAYPOINT_INVALID to 0xFFFF from -1 as that's the value the AIs got (due to casting).
Clarify some api documentation.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_industry.hpp4
-rw-r--r--src/ai/api/ai_vehicle.hpp5
-rw-r--r--src/ai/api/ai_waypoint.hpp2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/ai/api/ai_industry.hpp b/src/ai/api/ai_industry.hpp
index bf93cd466..da27ec920 100644
--- a/src/ai/api/ai_industry.hpp
+++ b/src/ai/api/ai_industry.hpp
@@ -86,7 +86,9 @@ public:
static TileIndex GetLocation(IndustryID industry_id);
/**
- * Get the number of stations around an industry.
+ * Get the number of stations around an industry. All stations that can
+ * service the industry are counted, your own stations but also your
+ * opponents stations.
* @param industry_id The index of the industry.
* @pre IsValidIndustry(industry_id).
* @return The number of stations around an industry.
diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp
index 6d15a8cef..bc2360b40 100644
--- a/src/ai/api/ai_vehicle.hpp
+++ b/src/ai/api/ai_vehicle.hpp
@@ -422,11 +422,12 @@ public:
static bool SellWagonChain(VehicleID vehicle_id, int wagon);
/**
- * Sends the given vehicle to a depot.
+ * Sends the given vehicle to a depot. If the vehicle has already been
+ * sent to a depot it continues with its normal orders instead.
* @param vehicle_id The vehicle to send to a depot.
* @pre IsValidVehicle(vehicle_id).
* @exception AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT
- * @return True if and only if the vehicle has been sent to a depot.
+ * @return True if the current order was changed.
*/
static bool SendVehicleToDepot(VehicleID vehicle_id);
diff --git a/src/ai/api/ai_waypoint.hpp b/src/ai/api/ai_waypoint.hpp
index 69eacb10e..9e1bec911 100644
--- a/src/ai/api/ai_waypoint.hpp
+++ b/src/ai/api/ai_waypoint.hpp
@@ -16,7 +16,7 @@ public:
static const char *GetClassName() { return "AIWaypoint"; }
enum SpecialWaypointIDs {
- WAYPOINT_INVALID = -1, //!< An invalid WaypointID.
+ WAYPOINT_INVALID = 0xFFFF, //!< An invalid WaypointID.
};
/**