1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 02:15:32 +00:00

simplifying CSMWorld::CellRef

This commit is contained in:
Marc Zinnschlag 2013-06-08 15:50:36 +02:00
parent 744198fc44
commit 97f421df8a
2 changed files with 10 additions and 8 deletions

View file

@ -3,12 +3,15 @@
#include "cell.hpp" #include "cell.hpp"
void CSMWorld::CellRef::load (ESM::ESMReader &esm, Cell& cell, const std::string& id) void CSMWorld::CellRef::load (ESM::ESMReader &esm)
{ {
mId = id; // The CellRef is not loaded here. Because of the unfortunate way how the ESMReader and the cell
// record is constructed, we do not have enough context in this function to perform a load.
cell.getNextRef (esm, *this); // mId = id;
if (!mDeleted) // cell.getNextRef (esm, *this);
cell.addRef (mId);
} // if (!mDeleted)
// cell.addRef (mId);
}

View file

@ -17,8 +17,7 @@ namespace CSMWorld
{ {
std::string mId; std::string mId;
void load (ESM::ESMReader &esm, Cell& cell, const std::string& id); void load (ESM::ESMReader &esm);
///< Load cell ref and register it with \a cell.
}; };
} }