From 9646804dcd3b4e50f90b46dfef0a85e15c670e48 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 30 Jul 2024 18:24:19 -0700 Subject: [PATCH] aa --- src/window.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/window.rs b/src/window.rs index b124701..8be5a57 100644 --- a/src/window.rs +++ b/src/window.rs @@ -29,8 +29,12 @@ impl WindowContext<'_>{ winit::event::WindowEvent::DroppedFile(path)=>{ match crate::file::load(path.as_path()){ Ok(map)=>{ - self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::ClearModels}).unwrap(); - self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::GenerateModels(map)}).unwrap(); + self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::Passthrough( + crate::physics_worker::PassthroughInstruction::ClearModels + )}).unwrap(); + self.physics_thread.send(TimedInstruction{time,instruction:crate::physics_worker::Instruction::Passthrough( + crate::physics_worker::PassthroughInstruction::GenerateModels(map) + )}).unwrap(); }, Err(e)=>println!("Failed to load map: {e}"), }