1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:53:53 +00:00

Patch for COC Spawn Issue.

OMW Bug #1079
Fall back to the first static's position, if there are no door markers.
This commit is contained in:
Jordan Ayers 2015-02-04 12:06:29 -06:00
parent 056a01a05b
commit 1f036c0381

View file

@ -2383,6 +2383,7 @@ namespace MWWorld
bool World::findInteriorPosition(const std::string &name, ESM::Position &pos)
{
typedef MWWorld::CellRefList<ESM::Door>::List DoorList;
typedef MWWorld::CellRefList<ESM::Static>::List StaticList;
pos.rot[0] = pos.rot[1] = pos.rot[2] = 0;
pos.pos[0] = pos.pos[1] = pos.pos[2] = 0;
@ -2427,6 +2428,13 @@ namespace MWWorld
}
}
}
// Fall back to the first static location.
const StaticList &statics = cellStore->get<ESM::Static>().mList;
if ( statics.begin() != statics.end() ) {
pos = statics.begin()->mRef.getPosition();
return true;
}
return false;
}