mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-05 15:55:45 +00:00
Remove unused FLTV and NAM0 from CellRef
This commit is contained in:
parent
4e0c133fb3
commit
d4ff17f1c5
@ -35,8 +35,6 @@ namespace MWWorld
|
||||
cellRef.mTeleport = false;
|
||||
cellRef.mLockLevel = 0;
|
||||
cellRef.mReferenceBlocked = 0;
|
||||
cellRef.mFltv = 0;
|
||||
cellRef.mNam0 = 0;
|
||||
|
||||
LiveCellRef<T> ref(cellRef, base);
|
||||
|
||||
|
@ -6,10 +6,12 @@
|
||||
|
||||
void ESM::CellRef::load (ESMReader& esm, bool wideRefNum)
|
||||
{
|
||||
// NAM0 sometimes appears here, sometimes further on
|
||||
mNam0 = 0;
|
||||
// According to Hrnchamd, this does not belong to the actual ref. Instead, it is a marker indicating that
|
||||
// the following refs are part of a "temp refs" section. A temp ref is not being tracked by the moved references system.
|
||||
// Its only purpose is a performance optimization for "immovable" things. We don't need this, and it's problematic anyway,
|
||||
// because any item can theoretically be moved by a script.
|
||||
if (esm.isNextSub ("NAM0"))
|
||||
esm.getHT (mNam0);
|
||||
esm.skipHSub();
|
||||
|
||||
if (wideRefNum)
|
||||
esm.getHNT (mRefNum, "FRMR", 8);
|
||||
@ -60,20 +62,12 @@ void ESM::CellRef::load (ESMReader& esm, bool wideRefNum)
|
||||
mKey = esm.getHNOString ("KNAM");
|
||||
mTrap = esm.getHNOString ("TNAM");
|
||||
|
||||
mFltv = 0;
|
||||
esm.getHNOT (mReferenceBlocked, "UNAM");
|
||||
esm.getHNOT (mFltv, "FLTV");
|
||||
|
||||
esm.getHNOT(mPos, "DATA", 24);
|
||||
|
||||
// Number of references in the cell? Maximum once in each cell,
|
||||
// but not always at the beginning, and not always right. In other
|
||||
// words, completely useless.
|
||||
// Update: Well, maybe not completely useless. This might actually be
|
||||
// number_of_references + number_of_references_moved_here_Across_boundaries,
|
||||
// and could be helpful for collecting these weird moved references.
|
||||
if (esm.isNextSub ("NAM0"))
|
||||
esm.getHT (mNam0);
|
||||
if (esm.isNextSub("NAM0"))
|
||||
esm.skipHSub();
|
||||
}
|
||||
|
||||
void ESM::CellRef::save (ESMWriter &esm, bool wideRefNum, bool inInventory) const
|
||||
@ -127,14 +121,8 @@ void ESM::CellRef::save (ESMWriter &esm, bool wideRefNum, bool inInventory) cons
|
||||
if (mReferenceBlocked != -1)
|
||||
esm.writeHNT("UNAM", mReferenceBlocked);
|
||||
|
||||
if (!inInventory && mFltv != 0)
|
||||
esm.writeHNT("FLTV", mFltv);
|
||||
|
||||
if (!inInventory)
|
||||
esm.writeHNT("DATA", mPos, 24);
|
||||
|
||||
if (!inInventory && mNam0 != 0)
|
||||
esm.writeHNT("NAM0", mNam0);
|
||||
}
|
||||
|
||||
void ESM::CellRef::blank()
|
||||
@ -156,8 +144,6 @@ void ESM::CellRef::blank()
|
||||
mKey.clear();
|
||||
mTrap.clear();
|
||||
mReferenceBlocked = 0;
|
||||
mFltv = 0;
|
||||
mNam0 = 0;
|
||||
mTeleport = false;
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
|
@ -82,12 +82,6 @@ namespace ESM
|
||||
// -1 is not blocked, otherwise it is blocked.
|
||||
signed char mReferenceBlocked;
|
||||
|
||||
// Occurs in Tribunal.esm, eg. in the cell "Mournhold, Plaza
|
||||
// Brindisi Dorom", where it has the value 100. Also only for
|
||||
// activators.
|
||||
int mFltv;
|
||||
int mNam0;
|
||||
|
||||
// Position and rotation of this object within the cell
|
||||
Position mPos;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user