fix(editor): filter bad M2 models, toast on tile not found, robustness

- Filter known effect/particle models from NPC presets (alliancebomb,
  blackhole, etc.) that cause vertex explosions — these are particle
  effect models misclassified as creatures
- "Find Tile" button now shows toast when no ADT exists for a map
- Vertex validation catches NaN/infinite/extreme positions before GPU
- These models are now skipped entirely from the creature browser
This commit is contained in:
Kelsi 2026-05-05 07:10:29 -07:00
parent c60ddcfed4
commit 16308011ee
2 changed files with 18 additions and 2 deletions

View file

@ -154,6 +154,19 @@ void NpcPresets::initialize(pipeline::AssetManager* am) {
std::string dirName = path.substr(firstSlash + 1, secondSlash - firstSlash - 1);
if (seen.count(dirName)) continue;
// Skip known effect/particle models that cause vertex explosions
static const char* skipModels[] = {
"alliancebomb", "alliancebrasscannon", "blackhole", "bodyofkathune",
"band", "broom", "broommount", "carpet", "celestialhorse",
"bloodqueen", "arthaslichking", "arthasundead"
};
bool skip = false;
for (const char* s : skipModels) {
if (dirName == s) { skip = true; break; }
}
if (skip) continue;
seen.insert(dirName);
// Get the actual M2 file path