mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-23 04:26:31 -04:00
Merge pull request #28 from DreamWeave-MP/you-need-to-be-more-dynamic
Fix(client): Override dynamic cell records as well, minor refactor for clarity
This commit is contained in:
commit
aee2ca980e
@ -801,8 +801,10 @@ namespace MWWorld
|
||||
*/
|
||||
ESM::Cell *Store<ESM::Cell>::override(const ESM::Cell &cell)
|
||||
{
|
||||
if (search(cell) != 0)
|
||||
{
|
||||
if (search(cell) == 0)
|
||||
return insert(cell);
|
||||
|
||||
|
||||
for (auto it = mSharedInt.begin(); it != mSharedInt.end(); ++it)
|
||||
{
|
||||
if (Misc::StringUtils::ciEqual((*it)->mName, cell.mName))
|
||||
@ -820,12 +822,17 @@ namespace MWWorld
|
||||
return &(*it).second;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
for (auto it = mDynamicInt.begin(); it != mDynamicInt.end(); ++it)
|
||||
{
|
||||
return insert(cell);
|
||||
if (Misc::StringUtils::ciEqual((*it).second.mName, cell.mName))
|
||||
{
|
||||
(*it).second = cell;
|
||||
return &(*it).second;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user