Fix attempt to not clear permanent models

This commit is contained in:
MysterD 2023-06-07 23:50:44 -07:00
parent 533cb2c8da
commit 3fecc1568d
1 changed files with 5 additions and 1 deletions

View File

@ -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];