summaryrefslogtreecommitdiff
path: root/BlockCondition.cpp
diff options
context:
space:
mode:
authorJapa Illo2012-03-15 14:08:20 +0100
committerJapa Illo2012-03-15 14:08:20 +0100
commitbb7bcc00c4eb2e46e5d7141fb2d0ce8a30386568 (patch)
tree584a0ff1e4c7df2fde5146270781793c80b8bb21 /BlockCondition.cpp
parent1bd9b2a540e52795cd3a9fbc402a1ee9736e1b70 (diff)
downloadstonesense-bb7bcc00c4eb2e46e5d7141fb2d0ce8a30386568.tar.gz
stonesense-bb7bcc00c4eb2e46e5d7141fb2d0ce8a30386568.tar.bz2
stonesense-bb7bcc00c4eb2e46e5d7141fb2d0ce8a30386568.tar.xz
Fixed building neighbor detection
Signed-off-by: Japa Illo <japa.mala.illo@gmail.com>
Diffstat (limited to 'BlockCondition.cpp')
-rw-r--r--BlockCondition.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/BlockCondition.cpp b/BlockCondition.cpp
index 8932de1..022b32b 100644
--- a/BlockCondition.cpp
+++ b/BlockCondition.cpp
@@ -32,14 +32,13 @@ int getDirectionFromString(const char* strDir)
int getBuildingFromString(const char* strType)
{
- /*
- for (uint32_t i=0; i<contentLoader->classIdStrings.size(); i++){
- if (contentLoader->classIdStrings[i].compare(strType) == 0)
- {
- return i;
- }
- }
- */
+ FOR_ENUM_ITEMS(building_type,i)
+ {
+ if (strcmp(strType,ENUM_KEY_STR(building_type,i)) == 0)
+ {
+ return i;
+ }
+ }
return INVALID_INDEX;
}