Make InvisibleTrap objects invisible and non-collidable

Event objects like Fire Festival Fury Trap and Mercutio Post use
SpellObject_InvisibleTrap.m2 models which were rendering as white
tiles using WHITE1.BLP texture. These are meant to be invisible
spell trigger objects that should not obstruct player movement.

Changes:
- Added isInvisibleTrap flag to M2ModelGPU struct
- Detect models with "invisibletrap" in name during loading
- Skip rendering invisible trap instances in render loop
- Disable all collision checks (floor/wall/occlusion) for invisible traps
- Objects remain functional for spell casting but are now invisible
This commit is contained in:
Kelsi 2026-02-09 22:31:36 -08:00
parent 463ee4a311
commit 8cb6311470
3 changed files with 65 additions and 6 deletions

View file

@ -0,0 +1,36 @@
#include <iostream>
#include "pipeline/dbc.hpp"
#include "pipeline/asset_manager.hpp"
int main() {
wowee::pipeline::AssetManager assetManager;
assetManager.initialize("Data");
auto godi = assetManager.loadDBC("GameObjectDisplayInfo.dbc");
if (!godi || !godi->isLoaded()) {
std::cerr << "Failed to load GameObjectDisplayInfo.dbc\n";
return 1;
}
std::cout << "GameObjectDisplayInfo.dbc loaded with " << godi->getRecordCount() << " records\n\n";
// Check displayIds 35 and 1287
uint32_t targetIds[] = {35, 1287};
for (uint32_t targetId : targetIds) {
bool found = false;
for (uint32_t i = 0; i < godi->getRecordCount(); i++) {
uint32_t displayId = godi->getUInt32(i, 0);
if (displayId == targetId) {
std::string modelName = godi->getString(i, 1);
std::cout << "DisplayId " << displayId << ": " << modelName << "\n";
found = true;
break;
}
}
if (!found) {
std::cout << "DisplayId " << targetId << ": NOT FOUND\n";
}
}
return 0;
}