diff --git a/src/physics.rs b/src/physics.rs index db25b8f..4b90028 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -489,7 +489,7 @@ enum MoveState{ } impl MoveState{ //call this after state.move_state is changed - fn changed(&self,body:&mut Body,touching:&TouchingState,models:&PhysicsModels,hitbox_mesh:&HitboxMesh,style:&StyleModifiers,camera:&PhysicsCamera,input_state:&InputState){ + fn apply_enum(&self,body:&mut Body,touching:&TouchingState,models:&PhysicsModels,hitbox_mesh:&HitboxMesh,style:&StyleModifiers,camera:&PhysicsCamera,input_state:&InputState){ match self{ MoveState::Fly=>body.acceleration=Planar64Vec3::ZERO, MoveState::Air=>{ @@ -956,7 +956,7 @@ impl PhysicsState { self.move_state.next_move_instruction(&self.style.strafe,self.time) } fn set_move_state(&mut self,data:&PhysicsData,move_state:MoveState){ - move_state.changed(&mut self.body,&self.touching,&data.models,&data.hitbox_mesh,&self.style,&self.camera,&self.input_state); + move_state.apply_enum(&mut self.body,&self.touching,&data.models,&data.hitbox_mesh,&self.style,&self.camera,&self.input_state); self.move_state=move_state; }