mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
fix(editor): unload ghost preview model when path changes
setGhostPreview reused modelId 59999 for every preview, but loadModel returns true without doing anything when the ID is already cached. So selecting a new NPC kept the old ghost model in GPU memory and createInstance used the stale model. Added M2Renderer::unloadModel public API and call it from clearGhostPreview.
This commit is contained in:
parent
ca630c4e87
commit
1c3307a0b6
3 changed files with 14 additions and 1 deletions
|
|
@ -287,6 +287,8 @@ public:
|
|||
|
||||
bool hasModel(uint32_t modelId) const;
|
||||
bool loadModel(const pipeline::M2Model& model, uint32_t modelId);
|
||||
/** Force-remove a model and all its GPU resources. Caller must ensure no instances reference it. */
|
||||
void unloadModel(uint32_t modelId);
|
||||
/** Mark a loaded model as a spell effect (full-brightness particles, no collision). */
|
||||
void markModelAsSpellEffect(uint32_t modelId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue