fix(editor): separate NPC marker updates from M2 rebuild cycle

- NPC placement now only updates cheap marker geometry (no M2 reload)
- Full M2 rebuild only triggers when PLACED OBJECT count changes
  (not NPC count — NPCs use markers, not M2 instances for now)
- Split lastObjectCount_ into lastObjCount_ + lastNpcCount_ to track
  objects and NPCs independently
- Prevents the destructive clear+reload cycle that caused GPU crashes
  when rapidly placing multiple NPCs
This commit is contained in:
Kelsi 2026-05-05 07:13:24 -07:00
parent 16308011ee
commit 0742abfe94
2 changed files with 23 additions and 12 deletions

View file

@ -136,7 +136,8 @@ public:
const std::vector<Toast>& getToasts() const { return toasts_; }
void updateToasts(float dt);
private:
size_t lastObjectCount_ = 0;
size_t lastObjCount_ = 0;
size_t lastNpcCount_ = 0;
EditorMode mode_ = EditorMode::Sculpt;
float waterHeight_ = 100.0f;
uint16_t waterType_ = 0;