fixed a bug (see commit reverted)

actorid
gugus 13 years ago
parent 99885e8ca4
commit 95c27723f7

@ -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;

Loading…
Cancel
Save