mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 18:39:41 +00:00
extended --start switch for exterior cell support
This commit is contained in:
parent
c16f79afc6
commit
8659ce3a82
2 changed files with 22 additions and 11 deletions
|
@ -264,9 +264,20 @@ void OMW::Engine::go()
|
|||
|
||||
// load cell
|
||||
ESM::Position pos;
|
||||
pos.pos[0] = pos.pos[1] = pos.pos[2] = 0;
|
||||
pos.rot[0] = pos.rot[1] = pos.rot[2] = 0;
|
||||
mEnvironment.mWorld->changeCell (mCellName, pos);
|
||||
pos.pos[2] = 0;
|
||||
|
||||
if (const ESM::Cell *exterior = mEnvironment.mWorld->getExterior (mCellName))
|
||||
{
|
||||
mEnvironment.mWorld->indexToPosition (exterior->data.gridX, exterior->data.gridY,
|
||||
pos.pos[0], pos.pos[1], true);
|
||||
mEnvironment.mWorld->changeToExteriorCell (pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
pos.pos[0] = pos.pos[1] = 0;
|
||||
mEnvironment.mWorld->changeCell (mCellName, pos);
|
||||
}
|
||||
|
||||
// Sets up the input system
|
||||
MWInput::MWInputManager input(mOgre, mEnvironment.mWorld->getPlayerPos(),
|
||||
|
|
|
@ -27,7 +27,7 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine)
|
|||
("data", bpo::value<std::string>()->default_value ("data"),
|
||||
"set data directory")
|
||||
("start", bpo::value<std::string>()->default_value ("Beshara"),
|
||||
"set initial cell (only interior cells supported at the moment")
|
||||
"set initial cell")
|
||||
("master", bpo::value<std::string>()->default_value ("Morrowind"),
|
||||
"master file")
|
||||
( "debug", "debug mode" )
|
||||
|
|
Loading…
Reference in a new issue