Remove unused KnockUp LocalEvent (use ApplyForce)

This commit is contained in:
AdamWhitehurst 2020-04-01 07:30:06 -07:00
parent 0c4d428298
commit 9ad9a24e22
2 changed files with 0 additions and 9 deletions

View File

@ -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

View File

@ -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