fix(editor): NPC ghost preview, scale control, frame sync for M2 rendering

- Ghost preview now shows in NPC mode (follows cursor with creature model)
- Added scale field to CreatureSpawn (default 1.0, slider 0.5-10x)
- NPC instances render at their configured scale
- Scale included in JSON save format
- M2Renderer::update() now runs AFTER beginFrame() so getCurrentFrame()
  returns the correct frame index — fixes instance SSBO mismatch that
  caused draws=0 despite loaded models
This commit is contained in:
Kelsi 2026-05-05 03:52:43 -07:00
parent 2980ca83e7
commit f38884856f
5 changed files with 13 additions and 3 deletions

View file

@ -69,6 +69,7 @@ bool NpcSpawner::saveToFile(const std::string& path) const {
f << " \"displayId\": " << s.displayId << ",\n";
f << " \"position\": [" << s.position.x << "," << s.position.y << "," << s.position.z << "],\n";
f << " \"orientation\": " << s.orientation << ",\n";
f << " \"scale\": " << s.scale << ",\n";
f << " \"level\": " << s.level << ",\n";
f << " \"health\": " << s.health << ",\n";
f << " \"mana\": " << s.mana << ",\n";