silence many compiler warnings

This commit is contained in:
Quaternions 2023-10-25 16:07:12 -07:00
parent 41dd155c50
commit 3a4c4ef9fe
5 changed files with 12 additions and 19 deletions

View File

@ -23,14 +23,6 @@ fn recursive_collect_superclass(objects: &mut std::vec::Vec<rbx_dom_weak::types:
}
}
}
fn get_texture_refs(dom:&rbx_dom_weak::WeakDom) -> Vec<rbx_dom_weak::types::Ref>{
let mut objects = std::vec::Vec::new();
recursive_collect_superclass(&mut objects, dom, dom.root(),"Decal");
//get ids
//clear vec
//next class
objects
}
fn planar64_affine3_from_roblox(cf:&rbx_dom_weak::types::CFrame,size:&rbx_dom_weak::types::Vector3)->Planar64Affine3{
Planar64Affine3::new(
Planar64Mat3::from_cols(

View File

@ -1108,7 +1108,7 @@ impl PhysicsState {
},
}
//generate instruction
if let Some(face) = exit_face{
if let Some(_face) = exit_face{
return Some(TimedInstruction {
time: best_time,
instruction: PhysicsInstruction::CollisionEnd(collision_data.clone())
@ -1365,7 +1365,7 @@ impl crate::instruction::InstructionConsumer<PhysicsInstruction> for PhysicsStat
match booster{
&crate::model::GameMechanicBooster::Affine(transform)=>v=transform.transform_point3(v),
&crate::model::GameMechanicBooster::Velocity(velocity)=>v+=velocity,
&crate::model::GameMechanicBooster::Energy{direction,energy}=>todo!(),
&crate::model::GameMechanicBooster::Energy{direction: _,energy: _}=>todo!(),
}
self.touching.constrain_velocity(&self.models,&mut v);
},
@ -1376,10 +1376,10 @@ impl crate::instruction::InstructionConsumer<PhysicsInstruction> for PhysicsStat
match trajectory{
crate::model::GameMechanicSetTrajectory::AirTime(_) => todo!(),
crate::model::GameMechanicSetTrajectory::Height(_) => todo!(),
crate::model::GameMechanicSetTrajectory::TargetPointTime { target_point, time } => todo!(),
crate::model::GameMechanicSetTrajectory::TrajectoryTargetPoint { target_point, speed, trajectory_choice } => todo!(),
crate::model::GameMechanicSetTrajectory::TargetPointTime { target_point: _, time: _ } => todo!(),
crate::model::GameMechanicSetTrajectory::TrajectoryTargetPoint { target_point: _, speed: _, trajectory_choice: _ } => todo!(),
&crate::model::GameMechanicSetTrajectory::Velocity(velocity)=>v=velocity,
crate::model::GameMechanicSetTrajectory::DotVelocity { direction, dot } => todo!(),
crate::model::GameMechanicSetTrajectory::DotVelocity { direction: _, dot: _ } => todo!(),
}
self.touching.constrain_velocity(&self.models,&mut v);
},
@ -1393,7 +1393,7 @@ impl crate::instruction::InstructionConsumer<PhysicsInstruction> for PhysicsStat
self.body.acceleration=a;
}
},
PhysicsCollisionAttributes::Intersect{intersecting,general}=>{
PhysicsCollisionAttributes::Intersect{intersecting: _,general}=>{
//I think that setting the velocity to 0 was preventing surface contacts from entering an infinite loop
self.touching.insert_intersect(c.model,c);
run_teleport_behaviour(&general.teleport_behaviour,&mut self.game,&self.models,&self.modes,&self.style,&mut self.touching,&mut self.body,model);
@ -1403,7 +1403,7 @@ impl crate::instruction::InstructionConsumer<PhysicsInstruction> for PhysicsStat
PhysicsInstruction::CollisionEnd(c) => {
let model=c.model(&self.models).unwrap();
match &model.attributes{
PhysicsCollisionAttributes::Contact{contacting,general}=>{
PhysicsCollisionAttributes::Contact{contacting: _,general: _}=>{
self.touching.remove_contact(c.model);//remove contact before calling contact_constrain_acceleration
let mut a=self.style.gravity;
if let Some(rocket_force)=self.style.rocket_force{
@ -1423,7 +1423,7 @@ impl crate::instruction::InstructionConsumer<PhysicsInstruction> for PhysicsStat
},
}
},
PhysicsCollisionAttributes::Intersect{intersecting,general}=>{
PhysicsCollisionAttributes::Intersect{intersecting: _,general: _}=>{
self.touching.remove_intersect(c.model);
},
}

View File

@ -62,7 +62,8 @@ impl SetupContextPartial2{
fn pick_adapter(self)->SetupContextPartial3{
let adapter;
let optional_features=optional_features();
//TODO: prefer adapter that implements optional features
//let optional_features=optional_features();
let required_features=required_features();
//no helper function smh gotta write it myself

View File

@ -32,7 +32,7 @@ impl WindowContext<'_>{
self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::GenerateModels(indexed_model_instances)}).unwrap();
}
},
winit::event::WindowEvent::Focused(state)=>{
winit::event::WindowEvent::Focused(_state)=>{
//pause unpause
//recalculate pressed keys on focus
},

View File

@ -1,6 +1,6 @@
use std::thread;
use std::sync::{mpsc,Arc};
use parking_lot::{Mutex,Condvar};
use parking_lot::Mutex;
//WorkerPool
struct Pool(u32);