mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 07:19:54 +00:00
18 lines
330 B
C++
18 lines
330 B
C++
|
|
#include "ref.hpp"
|
|
|
|
#include <cmath>
|
|
|
|
CSMWorld::CellRef::CellRef()
|
|
{
|
|
mRefNum.mIndex = 0;
|
|
mRefNum.mContentFile = 0;
|
|
}
|
|
|
|
std::pair<int, int> CSMWorld::CellRef::getCellIndex() const
|
|
{
|
|
const int cellSize = 8192;
|
|
|
|
return std::make_pair (
|
|
std::floor (mPos.pos[0]/cellSize), std::floor (mPos.pos[1]/cellSize));
|
|
}
|