From 1f036c0381f3cbaaf3f21670d998b3f422a339c3 Mon Sep 17 00:00:00 2001 From: Jordan Ayers Date: Wed, 4 Feb 2015 12:06:29 -0600 Subject: [PATCH] Patch for COC Spawn Issue. OMW Bug #1079 Fall back to the first static's position, if there are no door markers. --- apps/openmw/mwworld/worldimp.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 1036d8ce6..e08000b0b 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2383,6 +2383,7 @@ namespace MWWorld bool World::findInteriorPosition(const std::string &name, ESM::Position &pos) { typedef MWWorld::CellRefList::List DoorList; + typedef MWWorld::CellRefList::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().mList; + if ( statics.begin() != statics.end() ) { + pos = statics.begin()->mRef.getPosition(); + return true; + } + return false; }