mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 15:39:02 +00:00
20da0892ef
Slowly moving through the open-cs errors Good progress in openCS Very good progress on openCS Getting closer with openCS OpenCS compiles and runs! Didn't have time to test it all though ix openMW everything compiles on windows?? Fix gcc Fix Clang
32 lines
791 B
C++
32 lines
791 B
C++
#include "pathgrid.hpp"
|
|
#include "cell.hpp"
|
|
#include "idcollection.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.getRefIdString()[0] != '#' && cells.searchId(mId) == -1)
|
|
{
|
|
std::ostringstream stream;
|
|
stream << "#" << mData.mX << " " << mData.mY;
|
|
mId = ESM::RefId::stringRefId(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 = ESM::RefId::stringRefId(stream.str());
|
|
}
|
|
}
|