Struct veloren_common::path::Chaser
source · pub struct Chaser {
last_search_tgt: Option<Vec3<f32>>,
route: Option<(Route, bool)>,
astar: Option<Astar<Vec3<i32>, DefaultHashBuilder>>,
}
Expand description
A self-contained system that attempts to chase a moving target, only performing pathfinding if necessary
Fields§
§last_search_tgt: Option<Vec3<f32>>
§route: Option<(Route, bool)>
bool
indicates whether the Route is a complete route to the target
astar: Option<Astar<Vec3<i32>, DefaultHashBuilder>>
We use this hasher (AAHasher) because: (1) we care about DDOS attacks (ruling out FxHash); (2) we don’t care about determinism across computers (we can use AAHash).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Chaser
impl Send for Chaser
impl Sync for Chaser
impl Unpin for Chaser
impl UnwindSafe for Chaser
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<Context> SubContext<Context> for Context
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default
and panics on an error case.