mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Smoother pathfinding for fast animals
This commit is contained in:
committed by
jshipsey
parent
014cab0257
commit
8a0b7fd173
@ -78,7 +78,11 @@ impl Component for Agent {
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum Activity {
|
||||
Idle(Vec2<f32>),
|
||||
Follow(EcsEntity, Chaser),
|
||||
Follow {
|
||||
target: EcsEntity,
|
||||
chaser: Chaser,
|
||||
move_dir: Vec2<f32>,
|
||||
},
|
||||
Attack {
|
||||
target: EcsEntity,
|
||||
chaser: Chaser,
|
||||
@ -91,7 +95,7 @@ pub enum Activity {
|
||||
impl Activity {
|
||||
pub fn is_follow(&self) -> bool {
|
||||
match self {
|
||||
Activity::Follow(_, _) => true,
|
||||
Activity::Follow { .. } => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user