forked from mirror/openmw-tes3mp
ESM: Make sure to clear old list when a list is overwritten by another content file (Fixes #1932)
This commit is contained in:
parent
f5868f7ae1
commit
dec9ffdb6c
9 changed files with 12 additions and 0 deletions
|
@ -13,6 +13,7 @@ namespace ESM
|
|||
|
||||
void AIPackageList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
while (esm.hasMoreSubs()) {
|
||||
// initialize every iteration
|
||||
AIPackage pack;
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace ESM {
|
|||
|
||||
void EffectList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
ENAMstruct s;
|
||||
while (esm.isNextSub("ENAM")) {
|
||||
esm.getHT(s, 24);
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace ESM
|
|||
|
||||
void PartReferenceList::load(ESMReader &esm)
|
||||
{
|
||||
mParts.clear();
|
||||
while (esm.isNextSub("INDX"))
|
||||
{
|
||||
PartReference pr;
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace ESM
|
|||
|
||||
void InventoryList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
ContItem ci;
|
||||
while (esm.isNextSub("NPCO"))
|
||||
{
|
||||
|
|
|
@ -51,6 +51,7 @@ void NPC::load(ESMReader &esm)
|
|||
else
|
||||
mHasAI = false;
|
||||
|
||||
mTransport.clear();
|
||||
while (esm.isNextSub("DODT") || esm.isNextSub("DNAM")) {
|
||||
if (esm.retSubName() == 0x54444f44) { // DODT struct
|
||||
Dest dodt;
|
||||
|
|
|
@ -27,6 +27,9 @@ void Pathgrid::load(ESMReader &esm)
|
|||
esm.getHNT(mData, "DATA", 12);
|
||||
mCell = esm.getHNString("NAME");
|
||||
|
||||
mPoints.clear();
|
||||
mEdges.clear();
|
||||
|
||||
// keep track of total connections so we can reserve edge vector size
|
||||
int edgeCount = 0;
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ void Region::load(ESMReader &esm)
|
|||
|
||||
esm.getHNT(mMapColor, "CNAM");
|
||||
|
||||
mSoundList.clear();
|
||||
while (esm.hasMoreSubs())
|
||||
{
|
||||
SoundRef sr;
|
||||
|
|
|
@ -22,6 +22,8 @@ void Script::load(ESMReader &esm)
|
|||
mData = data.mData;
|
||||
mId = data.mName.toString();
|
||||
|
||||
mVarNames.clear();
|
||||
|
||||
// List of local variables
|
||||
if (esm.isNextSub("SCVR"))
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace ESM {
|
|||
|
||||
void SpellList::load(ESMReader &esm)
|
||||
{
|
||||
mList.clear();
|
||||
while (esm.isNextSub("NPCS")) {
|
||||
mList.push_back(esm.getHString());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue