avoid double rocket boost
This commit is contained in:
parent
5b26304e95
commit
46d6c31957
@ -1544,10 +1544,7 @@ impl crate::instruction::InstructionConsumer<PhysicsInstruction> for PhysicsStat
|
|||||||
PhysicsInputInstruction::Idle => {refresh_walk_target=false;},//literally idle!
|
PhysicsInputInstruction::Idle => {refresh_walk_target=false;},//literally idle!
|
||||||
}
|
}
|
||||||
if refresh_walk_target{
|
if refresh_walk_target{
|
||||||
let mut a=self.refresh_walk_target();
|
let a=self.refresh_walk_target();
|
||||||
if let Some(rocket_force)=self.style.rocket_force{
|
|
||||||
a+=self.style.get_propulsion_control_dir(&self.camera,self.controls,&self.next_mouse,self.time)*rocket_force;
|
|
||||||
}
|
|
||||||
if set_acceleration_cull(&mut self.body,&mut self.touching,&self.models,a){
|
if set_acceleration_cull(&mut self.body,&mut self.touching,&self.models,a){
|
||||||
(self.move_state,self.body.acceleration)=self.touching.get_move_state(&self.body,&self.models,&self.style,&self.camera,self.controls,&self.next_mouse,self.time);
|
(self.move_state,self.body.acceleration)=self.touching.get_move_state(&self.body,&self.models,&self.style,&self.camera,self.controls,&self.next_mouse,self.time);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user