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

modified gmst addition during creation of new base file

This commit is contained in:
mckibbenta 2013-06-23 15:19:08 -04:00
parent 16a27e28f7
commit 5803726233
2 changed files with 8 additions and 10 deletions

View file

@ -24,7 +24,7 @@ void CSMDoc::Document::load (const std::vector<boost::filesystem::path>::const_i
getData().loadFile (*end2, false); getData().loadFile (*end2, false);
} }
void CSMDoc::Document::addBaseGmsts() void CSMDoc::Document::addGmsts()
{ {
static const char *gmstFloats[] = static const char *gmstFloats[] =
{ {
@ -1922,8 +1922,8 @@ void CSMDoc::Document::addBaseGmsts()
ESM::GameSetting gmst; ESM::GameSetting gmst;
gmst.mId = gmstFloats[i]; gmst.mId = gmstFloats[i];
gmst.mValue.setType (ESM::VT_Float); gmst.mValue.setType (ESM::VT_Float);
gmst.mValue.setFloat(gmstFloatsValues[i]); gmst.mValue.setFloat (gmstFloatsValues[i]);
addOptionalGmst (gmst); getData().getGmsts().add (gmst);
} }
for (int i=0; gmstIntegers[i]; i++) for (int i=0; gmstIntegers[i]; i++)
@ -1931,8 +1931,8 @@ void CSMDoc::Document::addBaseGmsts()
ESM::GameSetting gmst; ESM::GameSetting gmst;
gmst.mId = gmstIntegers[i]; gmst.mId = gmstIntegers[i];
gmst.mValue.setType (ESM::VT_Int); gmst.mValue.setType (ESM::VT_Int);
gmst.mValue.setInteger(gmstIntegersValues[i]); gmst.mValue.setInteger (gmstIntegersValues[i]);
addOptionalGmst (gmst); getData().getGmsts().add (gmst);
} }
for (int i=0; gmstStrings[i]; i++) for (int i=0; gmstStrings[i]; i++)
@ -1941,7 +1941,7 @@ void CSMDoc::Document::addBaseGmsts()
gmst.mId = gmstStrings[i]; gmst.mId = gmstStrings[i];
gmst.mValue.setType (ESM::VT_String); gmst.mValue.setType (ESM::VT_String);
gmst.mValue.setString (""); gmst.mValue.setString ("");
addOptionalGmst (gmst); getData().getGmsts().add (gmst);
} }
} }
@ -2123,9 +2123,7 @@ void CSMDoc::Document::createBase()
for (int i=0; sGlobals[i]; ++i) for (int i=0; sGlobals[i]; ++i)
{ {
ESM::Global record; ESM::Global record;
record.mId = sGlobals[i]; record.mId = sGlobals[i];
record.mValue.setType (i==2 ? ESM::VT_Float : ESM::VT_Long); record.mValue.setType (i==2 ? ESM::VT_Float : ESM::VT_Long);
if (i==0 || i==1) if (i==0 || i==1)
@ -2134,7 +2132,7 @@ void CSMDoc::Document::createBase()
getData().getGlobals().add (record); getData().getGlobals().add (record);
} }
addBaseGmsts(); addGmsts();
for (int i=0; i<27; ++i) for (int i=0; i<27; ++i)
{ {

View file

@ -52,7 +52,7 @@ namespace CSMDoc
void createBase(); void createBase();
void addBaseGmsts(); void addGmsts();
void addOptionalGmsts(); void addOptionalGmsts();