summaryrefslogtreecommitdiff
path: root/Constructions.cpp
diff options
context:
space:
mode:
authorJonas Ask2009-10-30 03:18:01 +0000
committerJonas Ask2009-10-30 03:18:01 +0000
commit37c4d4618aea77ece7592c82ba04d9b7a0abc594 (patch)
tree36f00b2cd76238f66180fa9446f9abe7812d7465 /Constructions.cpp
parent834b50701e59c5fe1e84f1562f7bc0f2240db37f (diff)
downloadstonesense-37c4d4618aea77ece7592c82ba04d9b7a0abc594.tar.gz
stonesense-37c4d4618aea77ece7592c82ba04d9b7a0abc594.tar.bz2
stonesense-37c4d4618aea77ece7592c82ba04d9b7a0abc594.tar.xz
Fixed some boundary issues with navigating the edges of the map.
Slight performance tweak to MapLoading.cpp
Diffstat (limited to 'Constructions.cpp')
-rw-r--r--Constructions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Constructions.cpp b/Constructions.cpp
index 8f76c95..407796d 100644
--- a/Constructions.cpp
+++ b/Constructions.cpp
@@ -10,10 +10,10 @@ void changeConstructionMaterials(WorldSegment* segment, Block* b, vector<t_const
t_construction* c;
t_construction* construct = 0;
i = (uint32_t) allConstructions->size();
- if(!i) return;
- while(--i >=0 ){
+ if(i <= 0) return;
+ while(--i){
c = &(*allConstructions)[i];
- if(c->z == b->z && c->x == b->x && c->y == b->y){
+ if(c->x == b->x && c->y == b->y && c->z == b->z ){
construct = c;
break;
}