mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 21:49:56 +00:00
31 lines
725 B
C++
31 lines
725 B
C++
#include "cell.hpp"
|
|
#include "idcollection.hpp"
|
|
#include "pathgrid.hpp"
|
|
|
|
#include <sstream>
|
|
|
|
void CSMWorld::Pathgrid::load (ESM::ESMReader &esm, bool &isDeleted, const IdCollection<Cell>& cells)
|
|
{
|
|
load (esm, isDeleted);
|
|
|
|
// correct ID
|
|
if (!mId.empty() && mId[0]!='#' && cells.searchId (mId)==-1)
|
|
{
|
|
std::ostringstream stream;
|
|
stream << "#" << mData.mX << " " << mData.mY;
|
|
mId = stream.str();
|
|
}
|
|
}
|
|
|
|
void CSMWorld::Pathgrid::load (ESM::ESMReader &esm, bool &isDeleted)
|
|
{
|
|
ESM::Pathgrid::load (esm, isDeleted);
|
|
|
|
mId = mCell;
|
|
if (mCell.empty())
|
|
{
|
|
std::ostringstream stream;
|
|
stream << "#" << mData.mX << " " << mData.mY;
|
|
mId = stream.str();
|
|
}
|
|
}
|