Pass a cell id when teleporting to an exterior

depth-refraction
Evil Eye 2 years ago
parent ebb5820dd1
commit b027e96dee

@ -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())

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

Loading…
Cancel
Save