modified teleport action to support exteriors; coordinates are wrong here too

pull/10/head
Marc Zinnschlag 15 years ago
parent 0111631ee9
commit bdd5e2f064

@ -13,6 +13,9 @@ namespace MWWorld
void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment)
{
environment.mWorld->changeCell (mCellName, mPosition);
if (mCellName.empty())
environment.mWorld->changeToExteriorCell (mPosition);
else
environment.mWorld->changeCell (mCellName, mPosition);
}
}

@ -17,6 +17,7 @@ namespace MWWorld
public:
ActionTeleportPlayer (const std::string& cellName, const ESM::Position& position);
///< If cellName is empty, an exterior cell is asumed.
virtual void execute (Environment& environment);
};

Loading…
Cancel
Save