AIWaypoint Class Reference
Class that handles all waypoint related functions.
More...
Detailed Description
Class that handles all waypoint related functions.
Member Enumeration Documentation
Special waypoint IDs signalling different kinds of waypoints.
- Enumerator:
WAYPOINT_INVALID |
An invalid WaypointID.
|
Member Function Documentation
Get the current location of a waypoint.
- Parameters:
-
| waypoint_id | The waypoint to get the location of. |
- Precondition:
- IsValidWaypoint(waypoint_id).
- Returns:
- The tile the waypoint is currently on.
static char* AIWaypoint::GetName |
( |
WaypointID |
waypoint_id |
) |
[static] |
Get the name of a waypoint.
- Parameters:
-
| waypoint_id | The waypoint to get the name of. |
- Precondition:
- IsValidWaypoint(waypoint_id).
- Returns:
- The name of the waypoint.
Get the WaypointID of a tile.
- Parameters:
-
| tile | The tile to find the WaypointID of. |
- Precondition:
- AIRail::IsRailWaypointTile(tile).
- Returns:
- WaypointID of the waypoint.
static bool AIWaypoint::IsValidWaypoint |
( |
WaypointID |
waypoint_id |
) |
[static] |
Checks whether the given waypoint is valid and owned by you.
- Parameters:
-
| waypoint_id | The waypoint to check. |
- Returns:
- True if and only if the waypoint is valid.
static bool AIWaypoint::SetName |
( |
WaypointID |
waypoint_id, |
|
|
const char * |
name | |
|
) |
| | [static] |
Set the name this waypoint.
- Parameters:
-
| waypoint_id | The waypoint to set the name of. |
| name | The new name of the waypoint. |
- Precondition:
- IsValidWaypointwaypoint_id).
-
'name' must have at least one character.
-
'name' must have at most 30 characters.
- Exceptions:
-
- Returns:
- True if the name was changed.