forked from StrafesNET/strafe-client
rename MoveState::changed to apply_enum
This commit is contained in:
parent
f027594ab4
commit
d2a864e2c1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user