1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 01:23:52 +00:00

remove some redundant code

This commit is contained in:
greye 2012-08-10 21:03:46 +04:00
parent 38b06aee6c
commit 56c9c4dbd9

View file

@ -140,19 +140,18 @@ namespace MWWorld
const ESM::Position& pos,
bool adjustPlayerPos)
{
MWBase::Environment::get().getWorld()->getPlayer().setCell (cell);
bool hasWater = cell->cell->data.flags & cell->cell->HasWater;
mPhysics->setCurrentWater(hasWater, cell->cell->water);
MWBase::World *world = MWBase::Environment::get().getWorld();
MWWorld::Ptr player = world->getPlayer().getPlayer();
world->getPlayer().setCell(cell);
if (adjustPlayerPos) {
world->moveObject(player, pos.pos[0], pos.pos[1], pos.pos[2]);
world->rotateObject(player, pos.rot[0], pos.rot[1], pos.rot[2]);
}
world->getPlayer().setCell(cell);
MWMechanics::MechanicsManager *mechMgr =
MWBase::Environment::get().getMechanicsManager();