mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
Fix reference cell movement leaving behind deleted Ptrs for script access
This commit is contained in:
parent
17e3069896
commit
666248618e
1 changed files with 4 additions and 0 deletions
|
@ -1206,6 +1206,10 @@ namespace MWWorld
|
|||
}
|
||||
}
|
||||
ptr.getRefData().setCount(0);
|
||||
// Deleted references can still be accessed by scripts,
|
||||
// so we need this extra step to remove access to the old reference completely.
|
||||
// This will no longer be necessary once we have a proper cell movement tracker.
|
||||
ptr.getCellRef().unsetRefNum();
|
||||
}
|
||||
}
|
||||
if (haveToMove && ptr.getRefData().getBaseNode())
|
||||
|
|
Loading…
Reference in a new issue