1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-05-30 09:41:31 +00:00

Don't trigger cell change logic when the player isn't changing cells

This commit is contained in:
Evil Eye 2025-05-03 16:26:39 +02:00
parent 0e76a6edb5
commit 57c40bc052

View file

@ -100,7 +100,8 @@ namespace MWLua
stats.land(true);
stats.setTeleported(true);
world->getPlayer().setTeleported(true);
world->changeToCell(destCell->getCell()->getId(), toPos(pos, rot), false);
bool differentCell = ptr.getCell() != destCell;
world->changeToCell(destCell->getCell()->getId(), toPos(pos, rot), false, differentCell);
MWWorld::Ptr newPtr = world->getPlayerPtr();
world->moveObject(newPtr, pos);
world->rotateObject(newPtr, rot);