From 45d081ba422669be3d958fb5e5ca1edd211a75f1 Mon Sep 17 00:00:00 2001 From: Koncord Date: Sat, 25 Feb 2017 16:46:57 +0800 Subject: [PATCH] [Server] Compare new cells with loaded cells correctly --- apps/openmw-mp/Cell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index 933852a6a..8ce697651 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -127,8 +127,8 @@ Cell *CellController::addCell(ESM::Cell cellData) LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Loaded cells: %d", cells.size()); 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.mData.mX == cellData.mData.mX && c->cell.mData.mY == cellData.mData.mY && - c->cell.mCellId.mWorldspace == cellData.mCellId.mWorldspace; + return c->cell.isExterior() ? (c->cell.mData.mX == cellData.mData.mX && c->cell.mData.mY == cellData.mData.mY) : + (c->cell.mName == cellData.mName); }); Cell *cell; if (it == cells.end())