diff options
| author | Petr Mrázek | 2011-08-07 01:35:28 +0000 |
|---|---|---|
| committer | Petr Mrázek | 2011-08-07 01:35:28 +0000 |
| commit | 4064cf25797462fc6ac61f578b7e4b6bd31bf6b6 (patch) | |
| tree | 1a1744e66471edd1948b02bf4627e87693f1685a /CreatureConfiguration.cpp | |
| parent | d841ba0fee6e1f98e414c52dd07b44b981bc05fe (diff) | |
| download | stonesense-4064cf25797462fc6ac61f578b7e4b6bd31bf6b6.tar.gz stonesense-4064cf25797462fc6ac61f578b7e4b6bd31bf6b6.tar.bz2 stonesense-4064cf25797462fc6ac61f578b7e4b6bd31bf6b6.tar.xz | |
stonesense now doesn't crash while starting for the second time
Diffstat (limited to 'CreatureConfiguration.cpp')
| -rw-r--r-- | CreatureConfiguration.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/CreatureConfiguration.cpp b/CreatureConfiguration.cpp index d349ca4..477b662 100644 --- a/CreatureConfiguration.cpp +++ b/CreatureConfiguration.cpp @@ -41,7 +41,7 @@ void DumpProfessionsToDisk(){ FILE* fp = fopen("dump.txt", "w");
if(!fp) return;
string proffStr;
- for(int j=0; (proffStr = contentLoader.professionStrings[j]) != "" ; j++){
+ for(int j=0; (proffStr = contentLoader->professionStrings[j]) != "" ; j++){
fprintf(fp, "%i:%s\n",j, proffStr.c_str());
}
fclose(fp);
@@ -55,10 +55,10 @@ int translateProfession(const char* currentProf) if (currentProf == NULL || currentProf[0]==0)
return INVALID_INDEX;
- dfNumJobs = contentLoader.professionStrings.size();
+ dfNumJobs = contentLoader->professionStrings.size();
for(j=0; j < dfNumJobs; j++)
{
- proffStr = contentLoader.professionStrings[j];
+ proffStr = contentLoader->professionStrings[j];
if( proffStr.compare( currentProf ) == 0)
{
//assign ID
@@ -78,9 +78,9 @@ void pushCreatureConfig( vector<vector<CreatureConfiguration>*>& knownCreatures, {
//resize using hint from creature name list
unsigned int newsize = gameID +1;
- if (newsize <= contentLoader.Mats->race.size())
+ if (newsize <= contentLoader->Mats->race.size())
{
- newsize = contentLoader.Mats->race.size() + 1;
+ newsize = contentLoader->Mats->race.size() + 1;
}
knownCreatures.resize(newsize);
}
@@ -97,7 +97,7 @@ void pushCreatureConfig( vector<vector<CreatureConfiguration>*>& knownCreatures, bool addSingleCreatureConfig( TiXmlElement* elemCreature, vector<vector<CreatureConfiguration>*>& knownCreatures, int basefile ){
if(config.skipCreatureTypes)
return false;
- int gameID = lookupIndexedType(elemCreature->Attribute("gameID"),contentLoader.Mats->race);
+ int gameID = lookupIndexedType(elemCreature->Attribute("gameID"),contentLoader->Mats->race);
if (gameID == INVALID_INDEX)
return false;
const char* sheetIndexStr;
|
