mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
[Server] Compare new cells with loaded cells correctly
This commit is contained in:
parent
c9dc75f589
commit
45d081ba42
@ -127,8 +127,8 @@ Cell *CellController::addCell(ESM::Cell cellData)
|
|||||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Loaded cells: %d", cells.size());
|
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Loaded cells: %d", cells.size());
|
||||||
auto it = find_if(cells.begin(), cells.end(), [cellData](const Cell *c) {
|
auto it = find_if(cells.begin(), cells.end(), [cellData](const Cell *c) {
|
||||||
//return c->cell.sRecordId == cellData.sRecordId; // Currently we cannot compare because plugin lists can be loaded in different order
|
//return c->cell.sRecordId == cellData.sRecordId; // Currently we cannot compare because plugin lists can be loaded in different order
|
||||||
return c->cell.mData.mX == cellData.mData.mX && c->cell.mData.mY == cellData.mData.mY &&
|
return c->cell.isExterior() ? (c->cell.mData.mX == cellData.mData.mX && c->cell.mData.mY == cellData.mData.mY) :
|
||||||
c->cell.mCellId.mWorldspace == cellData.mCellId.mWorldspace;
|
(c->cell.mName == cellData.mName);
|
||||||
});
|
});
|
||||||
Cell *cell;
|
Cell *cell;
|
||||||
if (it == cells.end())
|
if (it == cells.end())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user