From ed13b4edc0df36fcde7093c260d6c8d3a289def4 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 31 Aug 2024 12:03:29 +0100 Subject: [PATCH] Fix invalid model cache on mission change --- project/code/TMV/ModelLoader.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/code/TMV/ModelLoader.cs b/project/code/TMV/ModelLoader.cs index 5448934..4de1cc2 100644 --- a/project/code/TMV/ModelLoader.cs +++ b/project/code/TMV/ModelLoader.cs @@ -34,7 +34,7 @@ public class ModelLoader // We don't care if this is null actually, we'll still cache that it's null lol var model = Timing.TimeStage("Load Models", () => { return LoadModel(_pathManager, ref campaignName, modelName); }); _cache[(campaignName, modelName)] = model; - return model; + return model?.Duplicate() as MeshInstance3D; } public static MeshInstance3D LoadModel(ResourcePathManager pathManager, ref string campaignName, string modelName)