clear prev map

This commit is contained in:
Quaternions 2023-09-21 16:00:49 -07:00
parent c9afa2d059
commit 1c9bc347f6

View File

@ -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{