mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 17:43:51 +00:00
feat(editor): viewport WOM/WOB lookups also probe per-zone roots
EditorViewport gains setActiveMapName() so rebuildObjects can pass per-zone prefixes (output/<map>/models|buildings/, custom_zones/<map>/...) to tryLoadByGamePath. EditorApp wires it from loadADT, loadWMOInstance, and createNewTerrain. Now the editor's preview mirrors the main game's priority: per-zone WOM/WOB beats global custom_zones/, beats game data.
This commit is contained in:
parent
db068d480b
commit
da2e7a4133
3 changed files with 31 additions and 4 deletions
|
|
@ -842,6 +842,7 @@ bool EditorApp::loadWMOInstance(const std::string& mapName) {
|
|||
loadedMap_ = mapName;
|
||||
loadedTileX_ = 32;
|
||||
loadedTileY_ = 32;
|
||||
viewport_.setActiveMapName(mapName);
|
||||
|
||||
// Position camera near the WMO
|
||||
camera_.setPosition(wmoPos + glm::vec3(0, 0, 50));
|
||||
|
|
@ -938,6 +939,7 @@ void EditorApp::loadADT(const std::string& mapName, int tileX, int tileY) {
|
|||
loadedMap_ = mapName;
|
||||
loadedTileX_ = tileX;
|
||||
loadedTileY_ = tileY;
|
||||
viewport_.setActiveMapName(mapName);
|
||||
|
||||
// Track recent zones (deduplicate, max 8)
|
||||
recentZones_.erase(std::remove_if(recentZones_.begin(), recentZones_.end(),
|
||||
|
|
@ -1046,6 +1048,7 @@ void EditorApp::createNewTerrain(const std::string& mapName, int tileX, int tile
|
|||
loadedMap_ = mapName;
|
||||
loadedTileX_ = tileX;
|
||||
loadedTileY_ = tileY;
|
||||
viewport_.setActiveMapName(mapName);
|
||||
lastObjCount_ = 0;
|
||||
lastNpcCount_ = 0;
|
||||
objectsDirty_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue