lol idk #1

Open
Quaternions wants to merge 99 commits from StrafesNET/strafe-client:master into master
Showing only changes of commit 3b3ccefebb - Show all commits

View File

@ -1315,7 +1315,9 @@ fn run_teleport_behaviour(wormhole:&Option<gameplay_attributes::Wormhole>,models
//check ground //check ground
state.touching.insert(c); state.touching.insert(c);
//I love making functions with 10 arguments to dodge the borrow checker //I love making functions with 10 arguments to dodge the borrow checker
run_teleport_behaviour(&general.wormhole,&data.models,&data.modes.get_mode(state.mode_state.get_mode_id()).unwrap(),&state.style,&data.hitbox_mesh,&mut state.mode_state,&mut state.touching,&mut state.body,convex_mesh_id); if let Some(mode)=data.modes.get_mode(state.mode_state.get_mode_id()){
run_teleport_behaviour(&general.wormhole,&data.models,mode,&state.style,&data.hitbox_mesh,&mut state.mode_state,&mut state.touching,&mut state.body,convex_mesh_id);
}
//flatten v //flatten v
state.touching.constrain_velocity(&data.models,&data.hitbox_mesh,&mut v); state.touching.constrain_velocity(&data.models,&data.hitbox_mesh,&mut v);
match &general.booster{ match &general.booster{
@ -1359,7 +1361,9 @@ fn run_teleport_behaviour(wormhole:&Option<gameplay_attributes::Wormhole>,models
(PhysicsCollisionAttributes::Intersect{intersecting: _,general},Collision::Intersect(intersect))=>{ (PhysicsCollisionAttributes::Intersect{intersecting: _,general},Collision::Intersect(intersect))=>{
//I think that setting the velocity to 0 was preventing surface contacts from entering an infinite loop //I think that setting the velocity to 0 was preventing surface contacts from entering an infinite loop
state.touching.insert(c); state.touching.insert(c);
run_teleport_behaviour(&general.wormhole,&data.models,&data.modes.get_mode(state.mode_state.get_mode_id()).unwrap(),&state.style,&data.hitbox_mesh,&mut state.mode_state,&mut state.touching,&mut state.body,convex_mesh_id); if let Some(mode)=data.modes.get_mode(state.mode_state.get_mode_id()){
run_teleport_behaviour(&general.wormhole,&data.models,mode,&state.style,&data.hitbox_mesh,&mut state.mode_state,&mut state.touching,&mut state.body,convex_mesh_id);
}
}, },
_=>panic!("invalid pair"), _=>panic!("invalid pair"),
} }