diff --git a/src/body.rs b/src/body.rs index d67b197b..08745461 100644 --- a/src/body.rs +++ b/src/body.rs @@ -328,7 +328,7 @@ pub struct PhysicsState{ //all models pub models:Vec, - pub stages:Vec, + pub modes:Vec, //the spawn point is where you spawn when you load into the map. //This is not the same as Reset which teleports you to Spawn0 pub spawn_point:glam::Vec3, diff --git a/src/load_roblox.rs b/src/load_roblox.rs index e3dd5fb5..0f3159b9 100644 --- a/src/load_roblox.rs +++ b/src/load_roblox.rs @@ -171,8 +171,6 @@ pub fn generate_indexed_models(dom:rbx_dom_weak::WeakDom) -> crate::model::Index //IndexedModelInstances includes textures let mut spawn_point=glam::Vec3::ZERO; - let mut stages=Vec::new(); - let mut indexed_models=Vec::new(); let mut model_id_from_description=std::collections::HashMap::::new(); @@ -424,6 +422,6 @@ pub fn generate_indexed_models(dom:rbx_dom_weak::WeakDom) -> crate::model::Index textures:asset_id_from_texture_id.iter().map(|t|t.to_string()).collect(), models:indexed_models, spawn_point, - stages, + modes:Vec::new(), } } diff --git a/src/main.rs b/src/main.rs index 9d330dfb..cbecae1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -528,7 +528,7 @@ impl framework::Example for GraphicsData { controls: 0, world:body::WorldState{}, game:body::GameMechanicsState::default(), - stages:Vec::new(), + modes:Vec::new(), }; //load textures @@ -784,7 +784,7 @@ impl framework::Example for GraphicsData { textures:Vec::new(), models:indexed_models, spawn_point:glam::Vec3::Y*50.0, - stages:Vec::new(), + modes:Vec::new(), }; graphics.generate_model_physics(&indexed_model_instances); graphics.generate_model_graphics(&device,&queue,indexed_model_instances); diff --git a/src/model.rs b/src/model.rs index 159c66d0..820cac43 100644 --- a/src/model.rs +++ b/src/model.rs @@ -65,11 +65,11 @@ pub struct IndexedModelInstances{ pub textures:Vec,//RenderPattern pub models:Vec, //may make this into an object later. - pub stages:Vec, + pub modes:Vec, pub spawn_point:glam::Vec3, } //stage description referencing flattened ids is spooky, but the map loading is meant to be deterministic. -pub struct StageDescription{ +pub struct ModeDescription{ pub start:u32,//start=model_id pub spawns:Vec,//spawns[spawn_id]=model_id pub ordered_checkpoints:Vec,//ordered_checkpoints[checkpoint_id]=model_id