mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 03:15:32 +00:00
fixed record state issues after merge
(cherry picked from commit 845cafd61c
)
This commit is contained in:
parent
9230c62884
commit
62daecadf5
3 changed files with 8 additions and 4 deletions
|
@ -66,7 +66,7 @@ namespace CSMTools
|
|||
const CSMWorld::Record<RecordType>& record = source.getRecord (stage);
|
||||
|
||||
if (!record.isDeleted())
|
||||
target.appendRecord (CSMWorld::Record<RecordType> (CSMWorld::RecordBase::State_BaseOnly, &record.get()));
|
||||
target.appendRecord (CSMWorld::Record<RecordType> (CSMWorld::RecordBase::State_ModifiedOnly, 0, &record.get()));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "refiddata.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
|
||||
#include <components/misc/stringops.hpp>
|
||||
|
||||
|
@ -344,7 +345,7 @@ const CSMWorld::RefIdDataContainer< ESM::Static >& CSMWorld::RefIdData::getStati
|
|||
return mStatics;
|
||||
}
|
||||
|
||||
void CSMWorld::RefIdData::insertRecord(CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type, const std::string& id)
|
||||
void CSMWorld::RefIdData::insertRecord (CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type, const std::string& id)
|
||||
{
|
||||
std::map<UniversalId::Type, RefIdDataContainerBase *>::iterator iter =
|
||||
mRecordContainers.find (type);
|
||||
|
@ -366,5 +367,7 @@ void CSMWorld::RefIdData::copyTo (int index, RefIdData& target) const
|
|||
|
||||
std::string id = source->getId (localIndex.first);
|
||||
|
||||
target.insertRecord (source->getRecord (localIndex.first), localIndex.second, id);
|
||||
std::auto_ptr<CSMWorld::RecordBase> newRecord (source->getRecord (localIndex.first).modifiedCopy());
|
||||
|
||||
target.insertRecord (*newRecord, localIndex.second, id);
|
||||
}
|
||||
|
|
|
@ -210,7 +210,8 @@ namespace CSMWorld
|
|||
|
||||
void erase (int index, int count);
|
||||
|
||||
void insertRecord(CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type, const std::string& id);
|
||||
void insertRecord (CSMWorld::RecordBase& record, CSMWorld::UniversalId::Type type,
|
||||
const std::string& id);
|
||||
|
||||
const RecordBase& getRecord (const LocalIndex& index) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue