forked from mirror/openmw-tes3mp
Add comment to Cell NAM0 (it's a RefId counter)
This commit is contained in:
parent
7ae9bbb1a5
commit
4e0c133fb3
3 changed files with 10 additions and 7 deletions
|
@ -513,7 +513,7 @@ void Record<ESM::Cell>::print()
|
||||||
else
|
else
|
||||||
std::cout << " Map Color: " << boost::format("0x%08X") % mData.mMapColor << std::endl;
|
std::cout << " Map Color: " << boost::format("0x%08X") % mData.mMapColor << std::endl;
|
||||||
std::cout << " Water Level Int: " << mData.mWaterInt << std::endl;
|
std::cout << " Water Level Int: " << mData.mWaterInt << std::endl;
|
||||||
std::cout << " NAM0: " << mData.mNAM0 << std::endl;
|
std::cout << " RefId counter: " << mData.mRefIdCounter << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ void Cell::load(ESMReader &esm, bool saveContext)
|
||||||
|
|
||||||
void Cell::loadCell(ESMReader &esm, bool saveContext)
|
void Cell::loadCell(ESMReader &esm, bool saveContext)
|
||||||
{
|
{
|
||||||
mNAM0 = 0;
|
mRefIdCounter = 0;
|
||||||
|
|
||||||
if (mData.mFlags & Interior)
|
if (mData.mFlags & Interior)
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@ void Cell::loadCell(ESMReader &esm, bool saveContext)
|
||||||
esm.getHNOT(mMapColor, "NAM5");
|
esm.getHNOT(mMapColor, "NAM5");
|
||||||
}
|
}
|
||||||
if (esm.isNextSub("NAM0")) {
|
if (esm.isNextSub("NAM0")) {
|
||||||
esm.getHT(mNAM0);
|
esm.getHT(mRefIdCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (saveContext) {
|
if (saveContext) {
|
||||||
|
@ -150,8 +150,8 @@ void Cell::save(ESMWriter &esm) const
|
||||||
esm.writeHNT("NAM5", mMapColor);
|
esm.writeHNT("NAM5", mMapColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mNAM0 != 0)
|
if (mRefIdCounter != 0)
|
||||||
esm.writeHNT("NAM0", mNAM0);
|
esm.writeHNT("NAM0", mRefIdCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cell::restore(ESMReader &esm, int iCtx) const
|
void Cell::restore(ESMReader &esm, int iCtx) const
|
||||||
|
@ -220,7 +220,7 @@ bool Cell::getNextMVRF(ESMReader &esm, MovedCellRef &mref)
|
||||||
mWater = 0;
|
mWater = 0;
|
||||||
mWaterInt = false;
|
mWaterInt = false;
|
||||||
mMapColor = 0;
|
mMapColor = 0;
|
||||||
mNAM0 = 0;
|
mRefIdCounter = 0;
|
||||||
|
|
||||||
mData.mFlags = 0;
|
mData.mFlags = 0;
|
||||||
mData.mX = 0;
|
mData.mX = 0;
|
||||||
|
|
|
@ -94,7 +94,10 @@ struct Cell
|
||||||
float mWater; // Water level
|
float mWater; // Water level
|
||||||
bool mWaterInt;
|
bool mWaterInt;
|
||||||
int mMapColor;
|
int mMapColor;
|
||||||
int mNAM0;
|
// Counter for RefIds. This is only used during content file editing and has no impact on gameplay.
|
||||||
|
// It prevents overwriting previous refIDs, even if they were deleted.
|
||||||
|
// as that would collide with refs when a content file is upgraded.
|
||||||
|
int mRefIdCounter;
|
||||||
|
|
||||||
// References "leased" from another cell (i.e. a different cell
|
// References "leased" from another cell (i.e. a different cell
|
||||||
// introduced this ref, and it has been moved here by a plugin)
|
// introduced this ref, and it has been moved here by a plugin)
|
||||||
|
|
Loading…
Reference in a new issue