1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Special case objects with no refnum

This commit is contained in:
scrawl 2015-12-06 18:43:52 +01:00
parent 5e99a3eda6
commit 138957c49a

View File

@ -213,6 +213,15 @@ namespace MWWorld
// TODO: ensure that the object actually exists in the cell
// Objects with no refnum can't be handled correctly in the merging process that happens
// on a save/load, so do a simple copy & delete for these objects.
if (!object.getCellRef().getRefNum().hasContentFile())
{
MWWorld::Ptr copied = object.getClass().copyToCell(object, *cellToMoveTo);
object.getRefData().setCount(0);
return copied;
}
MovedRefTracker::iterator found = mMovedHere.find(object.getBase());
if (found != mMovedHere.end())
{