fixed a bug (see commit reverted)

This commit is contained in:
gugus 2012-09-02 18:12:13 +02:00
parent 99885e8ca4
commit 95c27723f7

View file

@ -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) void World::moveObject(const Ptr &ptr, CellStore &newCell, float x, float y, float z)
{ {
ESM::Position &pos = ptr.getRefData().getPosition(); ESM::Position &pos = ptr.getRefData().getPosition();
@ -550,11 +560,10 @@ namespace MWWorld
CellStore *currCell = ptr.getCell(); CellStore *currCell = ptr.getCell();
bool isPlayer = ptr == mPlayer->getPlayer(); bool isPlayer = ptr == mPlayer->getPlayer();
bool haveToMove = mWorldScene->isCellActive(*currCell) || isPlayer; bool haveToMove = mWorldScene->isCellActive(*currCell) || isPlayer;
if (*currCell != newCell) { if (*currCell != newCell) {
if (isPlayer) { if (isPlayer) {
if (!newCell.isExterior()) { if (!newCell.isExterior()) {
changeToInteriorCell(newCell.cell->name, pos); changeToInteriorCell(toLower(newCell.cell->name), pos);
} else { } else {
int cellX = newCell.cell->data.gridX; int cellX = newCell.cell->data.gridX;
int cellY = newCell.cell->data.gridY; int cellY = newCell.cell->data.gridY;