Check for NPC and container collisions

This commit is contained in:
Eddoursul 2022-09-08 11:24:27 +02:00
parent c93e11b2cc
commit 0aec9b90d1
3 changed files with 102 additions and 2 deletions

BIN
SKSE/Plugins/EnderalSE.dll (Stored with Git LFS)

Binary file not shown.

View File

@ -1233,3 +1233,101 @@ inline void CheckUnconvertedMap()
}
}
}
inline void CheckEnderalContainers()
{
// Base forms of Enderal containers, having collisions with Skyrim
uint32_t formids[13] = {
0x17234,
0x3661E,
0x43BF2,
0x4602B,
0x469E6,
0x46AEF,
0x46D85,
0x56161,
0x56165,
0x7BC22,
0x967AA,
0xF85F4,
0x108AA7
};
for (int i = 0; i < 13; i++) {
const auto* form = RE::TESForm::LookupByID(formids[i]);
if (!form || !form->Is(RE::FormType::Container)) {
logger::warn("Detected invalid container: {:08X}", formids[i]);
NotifyInvalidForm(form);
}
}
}
inline void CheckEnderalNPCs()
{
// Base forms of Enderal actors, having collisions with Skyrim
uint32_t formids[55] = {
0x1722B,
0x1723A,
0x1A4E0,
0x22FA4,
0x22FA6,
0x23133,
0x2320C,
0x25D20,
0x2A006,
0x3280A,
0x365F6,
0x36613,
0x366F0,
0x3675D,
0x39F58,
0x3C599,
0x447BE,
0x447F3,
0x469E2,
0x469E3,
0x469E4,
0x46AF6,
0x46AF7,
0x46D83,
0x46D84,
0x46DFB,
0x46EE4,
0x46EF1,
0x46EF2,
0x46EF3,
0x4838F,
0x7265B,
0x7265E,
0x72660,
0x92A62,
0x92A64,
0x954D9,
0x967F9,
0xA8608,
0xA860B,
0xA8614,
0xA861E,
0xA9623,
0xBED8B,
0xCC95C,
0xDD714,
0xE48FA,
0xEA717,
0xEA71A,
0x103269,
0x1032B9,
0x1032C7,
0x1032CB,
0x1032CC,
0x1033FE
};
for (int i = 0; i < 55; i++) {
const auto* form = RE::TESForm::LookupByID(formids[i]);
if (!form || !form->Is(RE::FormType::NPC)) {
logger::warn("Detected invalid actor: {:08X}", formids[i]);
NotifyInvalidForm(form);
}
}
}

View File

@ -63,6 +63,8 @@ inline void CheckIncompatibleMods()
CheckUnconvertedMap();
CheckSkyrimCells();
CheckEnderalCells();
CheckEnderalContainers();
CheckEnderalNPCs();
}
inline void LoadINI(std::map<std::string, bool>* settings, const char* iniPath)