diff options
| author | Japa | 2010-04-11 04:33:44 +0000 |
|---|---|---|
| committer | Japa | 2010-04-11 04:33:44 +0000 |
| commit | ffcba85018dd24abdb4dbeb027f20dfe98e06319 (patch) | |
| tree | 7065b44fe5c2e84785f046161859bb7ba11ff951 /CreatureConfiguration.cpp | |
| parent | d152bfaf28ae7653e008a6763c2abb97c949c142 (diff) | |
| download | stonesense-ffcba85018dd24abdb4dbeb027f20dfe98e06319.tar.gz stonesense-ffcba85018dd24abdb4dbeb027f20dfe98e06319.tar.bz2 stonesense-ffcba85018dd24abdb4dbeb027f20dfe98e06319.tar.xz | |
creatures now work, and buildings show, but professions and building types don't load.
Diffstat (limited to 'CreatureConfiguration.cpp')
| -rw-r--r-- | CreatureConfiguration.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/CreatureConfiguration.cpp b/CreatureConfiguration.cpp index 6895414..070a86a 100644 --- a/CreatureConfiguration.cpp +++ b/CreatureConfiguration.cpp @@ -54,23 +54,23 @@ int translateProfession(const char* currentProf) if (currentProf == NULL || currentProf[0]==0)
return INVALID_INDEX;
uint32_t j;
- string proffStr;
- try
- {
- for(j=0; true; j++)
- {
- proffStr = dfMemoryInfo->getProfession(j);
- if( proffStr.compare( currentProf ) == 0)
- {
- //assign ID
- return j;
- }
- }
+ string proffStr;
+ try
+ {
+ for(j=0; true; j++)
+ {
+ proffStr = dfMemoryInfo->getProfession(j);
+ if( proffStr.compare( currentProf ) == 0)
+ {
+ //assign ID
+ return j;
+ }
+ }
}
catch (Error::MissingMemoryDefinition)
{
- WriteErr("Unable to match profession '%s' to anything in-game\n", currentProf);
- return INT_MAX; //if it is left at INVALID_INDEX, the condition is ignored entierly.
+ WriteErr("Unable to match profession '%s' to anything in-game\n", currentProf);
+ return INT_MAX; //if it is left at INVALID_INDEX, the condition is ignored entierly.
}
}
|
