mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-09 02:23:52 +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
|
|
@ -35,6 +35,7 @@ public:
|
|||
|
||||
void updateWater(const pipeline::ADTTerrain& terrain, int tileX, int tileY);
|
||||
void updateMarkers(const std::vector<PlacedObject>& objects);
|
||||
void updateNpcMarkers(const std::vector<CreatureSpawn>& npcs);
|
||||
void placeM2(const std::string& path, const glm::vec3& pos, const glm::vec3& rot, float scale);
|
||||
void placeWMO(const std::string& path, const glm::vec3& pos, const glm::vec3& rot);
|
||||
void clearObjects();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue