From 3fecc1568db20d49df41f2c8671e185b822ce1e1 Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 7 Jun 2023 23:50:44 -0700 Subject: [PATCH] Fix attempt to not clear permanent models --- data/dynos_mgr_models.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/dynos_mgr_models.cpp b/data/dynos_mgr_models.cpp index ff5681f0..db8b3e84 100644 --- a/data/dynos_mgr_models.cpp +++ b/data/dynos_mgr_models.cpp @@ -202,7 +202,11 @@ void DynOS_Model_ClearPool(enum ModelPool aModelPool) { if (sIdMap.count(info.id) == 0) { continue; } // preventing clearing permanent vanilla model slot - if (info.id <= VANILLA_ID_END && sIdMap.count(info.id) <= 1) { continue; } + if (info.id <= VANILLA_ID_END && sIdMap.count(info.id) <= 1) { + if (sAssetMap[MODEL_POOL_PERMANENT].count(info.asset) > 0) { + continue; + } + } // erase from id map auto& idMap = sIdMap[info.id];