This commit is contained in:
Quaternions 2024-02-21 02:32:00 -08:00
parent 8ffbca204b
commit 2496d71afa

View File

@ -702,7 +702,7 @@ impl TouchingState{
} }
fn base_acceleration(&self,models:&PhysicsModels,style:&StyleModifiers,camera:&PhysicsCamera,input_state:&InputState)->Planar64Vec3{ fn base_acceleration(&self,models:&PhysicsModels,style:&StyleModifiers,camera:&PhysicsCamera,input_state:&InputState)->Planar64Vec3{
let mut a=style.gravity; let mut a=style.gravity;
if let Some(rocket_settings)=style.rocket{ if let Some(rocket_settings)=&style.rocket{
a+=rocket_settings.acceleration(style.get_propulsion_control_dir(camera,input_state.controls)); a+=rocket_settings.acceleration(style.get_propulsion_control_dir(camera,input_state.controls));
} }
//add accelerators //add accelerators
@ -1369,7 +1369,7 @@ fn run_teleport_behaviour(wormhole:&Option<gameplay_attributes::Wormhole>,models
}, },
PhysicsInstruction::StrafeTick=>{ PhysicsInstruction::StrafeTick=>{
//TODO make this less huge //TODO make this less huge
if let Some(strafe_settings)=state.style.strafe{ if let Some(strafe_settings)=&state.style.strafe{
let controls=state.input_state.controls; let controls=state.input_state.controls;
if strafe_settings.activates(controls){ if strafe_settings.activates(controls){
let masked_controls=strafe_settings.mask(controls); let masked_controls=strafe_settings.mask(controls);