From 95c27723f7733f02a8d753d229d52e829c9c4913 Mon Sep 17 00:00:00 2001 From: gugus Date: Sun, 2 Sep 2012 18:12:13 +0200 Subject: [PATCH] fixed a bug (see commit reverted) --- apps/openmw/mwworld/worldimp.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 8ace54378..d9c4fe321 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -541,6 +541,16 @@ namespace MWWorld } } + std::string toLower (const std::string& name) + { + std::string lowerCase; + + std::transform (name.begin(), name.end(), std::back_inserter (lowerCase), + (int(*)(int)) std::tolower); + + return lowerCase; + } + void World::moveObject(const Ptr &ptr, CellStore &newCell, float x, float y, float z) { ESM::Position &pos = ptr.getRefData().getPosition(); @@ -550,11 +560,10 @@ namespace MWWorld CellStore *currCell = ptr.getCell(); bool isPlayer = ptr == mPlayer->getPlayer(); bool haveToMove = mWorldScene->isCellActive(*currCell) || isPlayer; - if (*currCell != newCell) { if (isPlayer) { if (!newCell.isExterior()) { - changeToInteriorCell(newCell.cell->name, pos); + changeToInteriorCell(toLower(newCell.cell->name), pos); } else { int cellX = newCell.cell->data.gridX; int cellY = newCell.cell->data.gridY;