forked from StrafesNET/strafe-project
fix dead code lints
This commit is contained in:
@@ -503,9 +503,6 @@ impl TransformedMesh<'_>{
|
||||
pub fn verts<'a>(&'a self)->impl Iterator<Item=vec3::Vector3<Fixed<2,64>>>+'a{
|
||||
self.view.data.verts.iter().map(|&Vert(pos)|self.transform.vertex.transform_point3(pos))
|
||||
}
|
||||
pub fn faces(&self)->impl Iterator<Item=SubmeshFaceId>{
|
||||
(0..self.view.topology.faces.len() as u32).map(SubmeshFaceId::new)
|
||||
}
|
||||
fn farthest_vert(&self,dir:Planar64Vec3)->SubmeshVertId{
|
||||
//this happens to be well-defined. there are no virtual virtices
|
||||
SubmeshVertId::new(
|
||||
@@ -1007,7 +1004,8 @@ impl MeshQuery for MinkowskiMesh<'_>{
|
||||
}
|
||||
fn vert_faces(&self,_vert_id:MinkowskiVert)->impl AsRef<[MinkowskiFace]>{
|
||||
unimplemented!();
|
||||
vec![]
|
||||
#[expect(unreachable_code)]
|
||||
Vec::new()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ enum TransientAcceleration{
|
||||
time:Time,
|
||||
},
|
||||
//walk target will never be reached
|
||||
#[expect(dead_code)]
|
||||
Unreachable{
|
||||
acceleration:Planar64Vec3,
|
||||
}
|
||||
@@ -184,6 +185,7 @@ struct PhysicsModels{
|
||||
intersect_attributes:HashMap<IntersectAttributesId,gameplay_attributes::IntersectAttributes>,
|
||||
}
|
||||
impl PhysicsModels{
|
||||
#[expect(dead_code)]
|
||||
fn clear(&mut self){
|
||||
self.meshes.clear();
|
||||
self.contact_models.clear();
|
||||
@@ -284,6 +286,7 @@ impl PhysicsCamera{
|
||||
fn rotation(&self)->Planar64Mat3{
|
||||
self.get_rotation(self.clamped_mouse_pos)
|
||||
}
|
||||
#[expect(dead_code)]
|
||||
fn simulate_move_rotation(&self,mouse_delta:glam::IVec2)->Planar64Mat3{
|
||||
self.get_rotation(self.clamped_mouse_pos+mouse_delta)
|
||||
}
|
||||
@@ -351,6 +354,7 @@ mod gameplay{
|
||||
pub fn unordered_checkpoint_count(&self)->u32{
|
||||
self.unordered_checkpoints.len() as u32
|
||||
}
|
||||
#[expect(dead_code)]
|
||||
pub fn set_mode_id(&mut self,mode_id:gameplay_modes::ModeId){
|
||||
self.clear();
|
||||
self.mode_id=mode_id;
|
||||
@@ -485,6 +489,7 @@ enum MoveState{
|
||||
Air,
|
||||
Walk(ContactMoveState),
|
||||
Ladder(ContactMoveState),
|
||||
#[expect(dead_code)]
|
||||
Water,
|
||||
Fly,
|
||||
}
|
||||
@@ -1270,6 +1275,7 @@ fn set_velocity_cull(body:&mut Body,touching:&mut TouchingState,models:&PhysicsM
|
||||
fn set_velocity(body:&mut Body,touching:&TouchingState,models:&PhysicsModels,hitbox_mesh:&HitboxMesh,v:Planar64Vec3){
|
||||
body.velocity=touching.constrain_velocity(models,hitbox_mesh,v);
|
||||
}
|
||||
#[expect(dead_code)]
|
||||
fn set_acceleration_cull(body:&mut Body,touching:&mut TouchingState,models:&PhysicsModels,hitbox_mesh:&HitboxMesh,a:Planar64Vec3)->bool{
|
||||
//This is not correct but is better than what I have
|
||||
let mut culled=false;
|
||||
|
||||
@@ -5,7 +5,6 @@ use strafesnet_deferred_loader::{loader::Loader,texture::Texture};
|
||||
|
||||
use crate::{Bsp,Vpk};
|
||||
|
||||
#[expect(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub enum TextureError{
|
||||
Io(std::io::Error),
|
||||
@@ -41,7 +40,6 @@ impl Loader for TextureLoader{
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
#[derive(Debug)]
|
||||
pub enum MeshError{
|
||||
Io(std::io::Error),
|
||||
|
||||
@@ -85,6 +85,7 @@ pub struct Segment{
|
||||
#[derive(Clone,Copy,Debug)]
|
||||
pub struct SegmentInfo{
|
||||
/// time of the first instruction in this segment.
|
||||
#[expect(dead_code)]
|
||||
time:Time,
|
||||
instruction_count:u32,
|
||||
/// How many total instructions in segments up to and including this segment
|
||||
@@ -116,6 +117,7 @@ impl<R:BinReaderExt> StreamableBot<R>{
|
||||
segment_map,
|
||||
})
|
||||
}
|
||||
#[expect(dead_code)]
|
||||
fn get_segment_info(&self,segment_id:SegmentId)->Result<SegmentInfo,Error>{
|
||||
Ok(*self.segment_map.get(segment_id.get() as usize).ok_or(Error::InvalidSegmentId(segment_id))?)
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ impl From<strafesnet_common::gameplay_style::StyleModifiers> for StyleModifiers{
|
||||
|
||||
#[binrw::binrw]
|
||||
#[brw(little,repr=u8)]
|
||||
#[expect(dead_code)]
|
||||
pub enum JumpCalculation{
|
||||
Max,
|
||||
BoostThenJump,
|
||||
@@ -128,6 +129,7 @@ impl From<strafesnet_common::gameplay_style::JumpCalculation> for JumpCalculatio
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(dead_code)]
|
||||
pub enum JumpImpulse{
|
||||
Time(Time),
|
||||
Height(Planar64),
|
||||
|
||||
Reference in New Issue
Block a user