mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Remove unused KnockUp LocalEvent (use ApplyForce)
This commit is contained in:
parent
0c4d428298
commit
9ad9a24e22
@ -47,9 +47,6 @@ pub enum SfxEvent {
|
|||||||
pub enum LocalEvent {
|
pub enum LocalEvent {
|
||||||
/// Applies upward force to entity's `Vel`
|
/// Applies upward force to entity's `Vel`
|
||||||
Jump(EcsEntity),
|
Jump(EcsEntity),
|
||||||
/// Applies the `force` + implicit upward force to
|
|
||||||
/// `entity`'s `Vel`
|
|
||||||
KnockUp { entity: EcsEntity, force: Vec3<f32> },
|
|
||||||
/// Applies the `force` to `entity`'s `Vel`
|
/// Applies the `force` to `entity`'s `Vel`
|
||||||
ApplyForce { entity: EcsEntity, force: Vec3<f32> },
|
ApplyForce { entity: EcsEntity, force: Vec3<f32> },
|
||||||
/// Applies leaping force to `entity`'s `Vel` away from `wall_dir` direction
|
/// Applies leaping force to `entity`'s `Vel` away from `wall_dir` direction
|
||||||
|
@ -355,12 +355,6 @@ impl State {
|
|||||||
vel.0.z = HUMANOID_JUMP_ACCEL;
|
vel.0.z = HUMANOID_JUMP_ACCEL;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
LocalEvent::KnockUp { entity, force } => {
|
|
||||||
if let Some(vel) = velocities.get_mut(entity) {
|
|
||||||
vel.0 = force;
|
|
||||||
vel.0.z = HUMANOID_JUMP_ACCEL;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
LocalEvent::ApplyForce { entity, force } => {
|
LocalEvent::ApplyForce { entity, force } => {
|
||||||
// TODO: this sets the velocity directly to the value of `force`, consider
|
// TODO: this sets the velocity directly to the value of `force`, consider
|
||||||
// renaming the event or changing the behavior
|
// renaming the event or changing the behavior
|
||||||
|
Loading…
Reference in New Issue
Block a user