mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(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.
This commit is contained in:
parent
27b831935f
commit
4444e48566
@ -86,7 +86,9 @@ public:
|
|||||||
static TileIndex GetLocation(IndustryID industry_id);
|
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.
|
* @param industry_id The index of the industry.
|
||||||
* @pre IsValidIndustry(industry_id).
|
* @pre IsValidIndustry(industry_id).
|
||||||
* @return The number of stations around an industry.
|
* @return The number of stations around an industry.
|
||||||
|
@ -422,11 +422,12 @@ public:
|
|||||||
static bool SellWagonChain(VehicleID vehicle_id, int wagon);
|
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.
|
* @param vehicle_id The vehicle to send to a depot.
|
||||||
* @pre IsValidVehicle(vehicle_id).
|
* @pre IsValidVehicle(vehicle_id).
|
||||||
* @exception AIVehicle::ERR_VEHICLE_CANNOT_SEND_TO_DEPOT
|
* @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);
|
static bool SendVehicleToDepot(VehicleID vehicle_id);
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ public:
|
|||||||
static const char *GetClassName() { return "AIWaypoint"; }
|
static const char *GetClassName() { return "AIWaypoint"; }
|
||||||
|
|
||||||
enum SpecialWaypointIDs {
|
enum SpecialWaypointIDs {
|
||||||
WAYPOINT_INVALID = -1, //!< An invalid WaypointID.
|
WAYPOINT_INVALID = 0xFFFF, //!< An invalid WaypointID.
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user