mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 09:09:42 +00:00
getExteriorCellLocation() added to MWWorld::Cell
This commit is contained in:
parent
a3bd6e7e47
commit
7c6471b0dc
3 changed files with 8 additions and 2 deletions
|
@ -77,4 +77,9 @@ namespace MWWorld
|
|||
else
|
||||
return mId;
|
||||
}
|
||||
|
||||
ESM::ExteriorCellLocation Cell::getExteriorCellLocation() const
|
||||
{
|
||||
return { mGridPos.x(), mGridPos.y(), getWorldSpace() };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <components/esm/esmbridge.hpp>
|
||||
#include <components/esm/refid.hpp>
|
||||
#include <components/esm/util.hpp>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
@ -48,6 +49,7 @@ namespace MWWorld
|
|||
float getWaterHeight() const { return mWaterHeight; }
|
||||
const ESM::RefId& getId() const { return mId; }
|
||||
ESM::RefId getWorldSpace() const;
|
||||
ESM::ExteriorCellLocation getExteriorCellLocation() const;
|
||||
|
||||
private:
|
||||
bool mIsExterior;
|
||||
|
|
|
@ -252,8 +252,7 @@ namespace
|
|||
for (auto* cell : collection)
|
||||
{
|
||||
assert(cell->getCell()->isExterior());
|
||||
if (cellIndex.mX == cell->getCell()->getGridX() && cellIndex.mY == cell->getCell()->getGridY()
|
||||
&& cell->getCell()->getWorldSpace() == cellIndex.mWorldspace)
|
||||
if (cellIndex == cell->getCell()->getExteriorCellLocation())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue