mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
fix(editor): reject out-of-range tile coords in loadADT
A tileX/tileY outside 0..63 would generate ADT paths the asset manager refuses, then poison the manifest.tiles entries on save. Reject upfront with a log message.
This commit is contained in:
parent
237cc67b24
commit
efd0a6de29
1 changed files with 8 additions and 0 deletions
|
|
@ -855,6 +855,14 @@ bool EditorApp::loadWMOInstance(const std::string& mapName) {
|
|||
}
|
||||
|
||||
void EditorApp::loadADT(const std::string& mapName, int tileX, int tileY) {
|
||||
// WoW tile grid is 64x64 — out-of-range coords would compute paths
|
||||
// like "World\Maps\Foo\Foo_-1_-1.adt" that the asset manager refuses,
|
||||
// and would also poison the manifest.tiles entries on save.
|
||||
if (tileX < 0 || tileX > 63 || tileY < 0 || tileY > 63) {
|
||||
LOG_ERROR("loadADT rejected: tile (", tileX, ",", tileY,
|
||||
") out of valid 0..63 range");
|
||||
return;
|
||||
}
|
||||
// Clear previous state before loading new tile
|
||||
clearAllObjects();
|
||||
questEditor_.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue