forked from teamnwah/openmw-tes3coop
Load default markers definitions (bug #4410)
This commit is contained in:
parent
b995584ad2
commit
1dd36329a3
3 changed files with 42 additions and 3 deletions
|
@ -141,6 +141,7 @@ void ESMStore::setUp()
|
||||||
mMagicEffects.setUp();
|
mMagicEffects.setUp();
|
||||||
mAttributes.setUp();
|
mAttributes.setUp();
|
||||||
mDialogs.setUp();
|
mDialogs.setUp();
|
||||||
|
mStatics.setUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ESMStore::countSavedGameRecords() const
|
int ESMStore::countSavedGameRecords() const
|
||||||
|
|
|
@ -1053,6 +1053,34 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
void Store<ESM::Static>::setUp()
|
||||||
|
{
|
||||||
|
// Load default marker definitions, if game files do not have them for some reason
|
||||||
|
std::pair<std::string, std::string> markers[] = {
|
||||||
|
std::make_pair("divinemarker", "marker_divine.nif"),
|
||||||
|
std::make_pair("doormarker", "marker_arrow.nif"),
|
||||||
|
std::make_pair("northmarker", "marker_north.nif"),
|
||||||
|
std::make_pair("templemarker", "marker_temple.nif"),
|
||||||
|
std::make_pair("travelmarker", "marker_travel.nif")
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const std::pair<std::string, std::string> marker : markers)
|
||||||
|
{
|
||||||
|
if (search(marker.first) == 0)
|
||||||
|
{
|
||||||
|
ESM::Static newMarker = ESM::Static(marker.first, marker.second);
|
||||||
|
mStatic.insert(std::make_pair(marker.first, newMarker));
|
||||||
|
|
||||||
|
std::map<std::string, ESM::Static>::iterator found = mStatic.find(marker.first);
|
||||||
|
if (found != mStatic.end())
|
||||||
|
{
|
||||||
|
mShared.push_back(&found->second);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline RecordId Store<ESM::Dialogue>::load(ESM::ESMReader &esm) {
|
inline RecordId Store<ESM::Dialogue>::load(ESM::ESMReader &esm) {
|
||||||
// The original letter case of a dialogue ID is saved, because it's printed
|
// The original letter case of a dialogue ID is saved, because it's printed
|
||||||
|
|
|
@ -33,6 +33,16 @@ struct Static
|
||||||
|
|
||||||
void blank();
|
void blank();
|
||||||
///< Set record to default state (does not touch the ID).
|
///< Set record to default state (does not touch the ID).
|
||||||
|
|
||||||
|
Static(const std::string id, const std::string &model)
|
||||||
|
: mId(id)
|
||||||
|
, mModel(model)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Static()
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue