From 1c9bc347f69cb3d60eae19a553a14f2449acf1c2 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 21 Sep 2023 16:00:49 -0700 Subject: [PATCH] clear prev map --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 51957f84..c7ad95fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -850,6 +850,9 @@ impl strafe_client::framework::Example for GraphicsData { if let Ok(file)=std::fs::File::open(path){ let input = std::io::BufReader::new(file); let modeldatas=self.generate_modeldatas_roblox(input); + //if generate_modeldatas succeeds, clear the previous ones + self.models.clear(); + self.physics.models.clear(); self.generate_model_physics(&modeldatas); self.generate_model_graphics(device,modeldatas); }else{