1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-21 00:39:58 +00:00

Pass a cell id when teleporting to an exterior

This commit is contained in:
Evil Eye 2023-04-08 12:13:48 +02:00
parent ebb5820dd1
commit b027e96dee
2 changed files with 3 additions and 9 deletions

View File

@ -487,9 +487,7 @@ namespace MWMechanics
world->getPlayer().getMarkedPosition(markedCell, markedPosition);
if (markedCell)
{
ESM::RefId dest;
if (!markedCell->isExterior())
dest = markedCell->getCell()->getId();
ESM::RefId dest = markedCell->getCell()->getId();
MWWorld::ActionTeleport action(dest, markedPosition, false);
action.execute(target);
if (!caster.isEmpty())

View File

@ -1436,9 +1436,7 @@ namespace MWWorld
esmPos.pos[0] = traced.x();
esmPos.pos[1] = traced.y();
esmPos.pos[2] = traced.z();
ESM::RefId cell;
if (!actor.getCell()->isExterior())
cell = actor.getCell()->getCell()->getId();
ESM::RefId cell = actor.getCell()->getCell()->getId();
MWWorld::ActionTeleport(cell, esmPos, false).execute(actor);
}
}
@ -3447,9 +3445,7 @@ namespace MWWorld
return;
}
ESM::RefId cellId;
if (!closestMarker.mCell->isExterior())
cellId = closestMarker.mCell->getCell()->getId();
ESM::RefId cellId = closestMarker.mCell->getCell()->getId();
MWWorld::ActionTeleport action(cellId, closestMarker.getRefData().getPosition(), false);
action.execute(ptr);