mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 10:03:51 +00:00
fix(editor): stop destructive M2 rebuild on every NPC click, fix Clear All
Root cause of GPU crashes (VK_ERROR_DEVICE_LOST): every NPC placement triggered a full clear+reload of ALL M2 models. After several cycles the GPU state corrupted, causing vertex explosions and device lost. Fixes: - NPC placement now only updates cheap marker geometry (no M2 reload) - Full M2 rebuild only happens when object COUNT changes (not every click) - clearAllObjects() properly resets viewport, placer, spawner, markers, and history in one call with vkDeviceWaitIdle fence - New Terrain uses clearAllObjects() for consistent reset - Clear All menu item calls clearAllObjects() - M2 vertex validation: rejects models with NaN/infinite/extreme vertex positions before GPU upload (prevents vertex explosions) - NPC marker building extracted to updateNpcMarkers() method (can be called independently without M2 rebuild)
This commit is contained in:
parent
1c58911da0
commit
c60ddcfed4
5 changed files with 103 additions and 73 deletions
|
|
@ -76,6 +76,7 @@ public:
|
|||
void setSkyPreset(int preset); // 0=day, 1=dusk, 2=night
|
||||
void snapSelectedToGround();
|
||||
void flyToSelected();
|
||||
void clearAllObjects();
|
||||
void centerOnTerrain();
|
||||
|
||||
// Multi-tile support
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue