fixups
This commit is contained in:
parent
50eeeb003a
commit
96e163643b
@ -28,7 +28,7 @@ pub fn new<'a>(
|
|||||||
crate::compat_worker::INWorker::new(move |ins:Instruction|{
|
crate::compat_worker::INWorker::new(move |ins:Instruction|{
|
||||||
match ins{
|
match ins{
|
||||||
Instruction::GenerateModels(indexed_model_instances)=>{
|
Instruction::GenerateModels(indexed_model_instances)=>{
|
||||||
graphics.generate_models(&device,&queue,indexed_model_instances);
|
graphics.generate_models(&device,&queue,&indexed_model_instances);
|
||||||
},
|
},
|
||||||
Instruction::ClearModels=>{
|
Instruction::ClearModels=>{
|
||||||
graphics.clear();
|
graphics.clear();
|
||||||
|
@ -943,11 +943,11 @@ impl PhysicsContext{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn generate_models(&mut self,map:map::Map){
|
pub fn generate_models(&mut self,map:&map::Map){
|
||||||
let mut starts=Vec::new();
|
let mut starts=Vec::new();
|
||||||
let mut spawns=Vec::new();
|
let mut spawns=Vec::new();
|
||||||
let mut attr_hash=HashMap::new();
|
let mut attr_hash=HashMap::new();
|
||||||
for (model_id,model) in map.models{
|
for (&model_id,model) in &map.models{
|
||||||
let mesh_id=self.data.models.meshes.len();
|
let mesh_id=self.data.models.meshes.len();
|
||||||
let mut make_mesh=false;
|
let mut make_mesh=false;
|
||||||
for model_instance in &model.instances{
|
for model_instance in &model.instances{
|
||||||
|
Loading…
Reference in New Issue
Block a user