From de0eb0790a922b099c845bcf8b06878c0dc04fc9 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 3 Oct 2023 16:29:30 -0700 Subject: [PATCH] fixups --- src/load_roblox.rs | 2 +- src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/load_roblox.rs b/src/load_roblox.rs index 0972fabe..80698cb9 100644 --- a/src/load_roblox.rs +++ b/src/load_roblox.rs @@ -150,7 +150,7 @@ pub fn generate_indexed_models(dom:rbx_dom_weak::WeakDom) -> crate::model::Index glam::Vec3::new(size.x,size.y,size.z)/2.0 ); if object.name=="MapStart"{ - spawn_point=model_transform.transform_point3(glam::Vec3::Y)+glam::vec3(0.0,2.5,0.0); + spawn_point=model_transform.transform_point3(-glam::Vec3::Y)+glam::vec3(0.0,2.5+0.1,0.0); println!("Found MapStart{:?}",spawn_point); } if *transparency==1.0 { diff --git a/src/main.rs b/src/main.rs index b780f80b..72b8db79 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,7 @@ impl GraphicsData { } println!("Physics Objects: {}",self.physics.models.len()); } - fn generate_model_graphics(&mut self,device:&wgpu::Device,queue:&wgpu::Queue,mut indexed_models:model::IndexedModelInstances){ + fn generate_model_graphics(&mut self,device:&wgpu::Device,queue:&wgpu::Queue,indexed_models:model::IndexedModelInstances){ //generate texture view per texture //idk how to do this gooder lol @@ -174,7 +174,7 @@ impl GraphicsData { //check each group, if it's using a new texture then make a new clone of the model let id=unique_texture_models.len(); let mut unique_textures=Vec::new(); - for group in model.groups.drain(..){ + for group in model.groups.into_iter(){ //ignore zero coppy optimization for now let texture_index=if let Some(texture_index)=unique_textures.iter().position(|&texture|texture==group.texture){ texture_index @@ -238,7 +238,7 @@ impl GraphicsData { texture:model.texture, }); } - //drain the modeldata vec so entities can be /moved/ to models.entities + //.into_iter() the modeldata vec so entities can be /moved/ to models.entities let mut model_count=0; let mut instance_count=0; let uniform_buffer_binding_size=::required_limits().max_uniform_buffer_binding_size as usize;