From 9ad9a24e22f734ab39522561466c586c3a1be990 Mon Sep 17 00:00:00 2001 From: AdamWhitehurst Date: Wed, 1 Apr 2020 07:30:06 -0700 Subject: [PATCH] Remove unused KnockUp LocalEvent (use ApplyForce) --- common/src/event.rs | 3 --- common/src/state.rs | 6 ------ 2 files changed, 9 deletions(-) diff --git a/common/src/event.rs b/common/src/event.rs index 1575f31283..6721107fd7 100644 --- a/common/src/event.rs +++ b/common/src/event.rs @@ -47,9 +47,6 @@ pub enum SfxEvent { pub enum LocalEvent { /// Applies upward force to entity's `Vel` Jump(EcsEntity), - /// Applies the `force` + implicit upward force to - /// `entity`'s `Vel` - KnockUp { entity: EcsEntity, force: Vec3 }, /// Applies the `force` to `entity`'s `Vel` ApplyForce { entity: EcsEntity, force: Vec3 }, /// Applies leaping force to `entity`'s `Vel` away from `wall_dir` direction diff --git a/common/src/state.rs b/common/src/state.rs index 91374f1a2f..62f492e513 100644 --- a/common/src/state.rs +++ b/common/src/state.rs @@ -355,12 +355,6 @@ impl State { 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 } => { // TODO: this sets the velocity directly to the value of `force`, consider // renaming the event or changing the behavior