mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Velocity-corrected bezier pathfinding control, swimming control
This commit is contained in:
committed by
jshipsey
parent
ca9ae13527
commit
8508b5177b
@ -157,6 +157,7 @@ pub struct ControllerInputs {
|
||||
pub wall_leap: Input,
|
||||
pub charge: Input,
|
||||
pub climb: Option<Climb>,
|
||||
pub swim: Input,
|
||||
pub move_dir: Vec2<f32>,
|
||||
pub look_dir: Dir,
|
||||
}
|
||||
@ -180,6 +181,7 @@ impl ControllerInputs {
|
||||
self.glide.tick(dt);
|
||||
self.wall_leap.tick(dt);
|
||||
self.charge.tick(dt);
|
||||
self.swim.tick(dt);
|
||||
}
|
||||
|
||||
pub fn tick_freshness(&mut self) {
|
||||
@ -191,6 +193,7 @@ impl ControllerInputs {
|
||||
self.glide.tick_freshness();
|
||||
self.wall_leap.tick_freshness();
|
||||
self.charge.tick_freshness();
|
||||
self.swim.tick_freshness();
|
||||
}
|
||||
|
||||
/// Updates Controller inputs with new version received from the client
|
||||
@ -204,6 +207,7 @@ impl ControllerInputs {
|
||||
self.wall_leap.update_with_new(new.wall_leap);
|
||||
self.charge.update_with_new(new.charge);
|
||||
self.climb = new.climb;
|
||||
self.swim.update_with_new(new.swim);
|
||||
self.move_dir = new.move_dir;
|
||||
self.look_dir = new.look_dir;
|
||||
}
|
||||
|
Reference in New Issue
Block a user