#[repr(C)]pub struct SInitPathCommand {
pub start_posF3: *mut f32,
pub end_posF3: *mut f32,
pub pathType: c_int,
pub goalRadius: f32,
pub ret_pathId: c_int,
}
Expand description
The following functions allow the AI to use the built-in path-finder.
- call InitPath and you get a pathId back
- use this to call GetNextWaypoint to get subsequent waypoints; the waypoints are centered on 8*8 squares
- note that the pathfinder calculates the waypoints as needed, so do not retrieve them until they are needed
- the waypoint’s x and z coordinates are returned in x and z, while y is used for status codes: y = 0: legal path waypoint IFF x >= 0 and z >= 0 y = -1: temporary waypoint, path not yet available
- for pathType, @see UnitDef_MoveData_getPathType()
- goalRadius defines a goal area within which any square could be accepted as path target. If a singular goal position is wanted, use 0.0f. default: 8.0f
Fields§
§start_posF3: *mut f32
The starting location of the requested path
end_posF3: *mut f32
The goal location of the requested path
pathType: c_int
For what type of unit should the path be calculated
goalRadius: f32
default: 8.0f
ret_pathId: c_int
Trait Implementations§
Source§impl Clone for SInitPathCommand
impl Clone for SInitPathCommand
Source§fn clone(&self) -> SInitPathCommand
fn clone(&self) -> SInitPathCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SInitPathCommand
impl Debug for SInitPathCommand
impl Copy for SInitPathCommand
Auto Trait Implementations§
impl Freeze for SInitPathCommand
impl RefUnwindSafe for SInitPathCommand
impl !Send for SInitPathCommand
impl !Sync for SInitPathCommand
impl Unpin for SInitPathCommand
impl UnwindSafe for SInitPathCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more