From d2a864e2c1a39b0d64944180079bedc64d1a816f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 21 Feb 2024 22:07:05 -0800 Subject: [PATCH] rename MoveState::changed to apply_enum --- src/physics.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }