summaryrefslogtreecommitdiff
path: root/WorldSegment.cpp
diff options
context:
space:
mode:
authorJonas Ask2009-11-20 16:30:03 +0000
committerJonas Ask2009-11-20 16:30:03 +0000
commitc606858a2e226e91919c7f084e7f40300a1ccb56 (patch)
treef32c55fa3596bc99924ddf06833cfa82a3922d27 /WorldSegment.cpp
parent1c737281d6bf440198c19b4d8facd76375e4c05d (diff)
downloadstonesense-c606858a2e226e91919c7f084e7f40300a1ccb56.tar.gz
stonesense-c606858a2e226e91919c7f084e7f40300a1ccb56.tar.bz2
stonesense-c606858a2e226e91919c7f084e7f40300a1ccb56.tar.xz
Improved how the view clips to the world boundaries.
Diffstat (limited to 'WorldSegment.cpp')
-rw-r--r--WorldSegment.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/WorldSegment.cpp b/WorldSegment.cpp
index 1372a3d..7c17a6f 100644
--- a/WorldSegment.cpp
+++ b/WorldSegment.cpp
@@ -3,10 +3,10 @@
#include "GUI.h"
-Block* WorldSegment::getBlock(uint32_t x, uint32_t y, uint32_t z){
- if((int)x < this->x || x >= (uint32_t)this->x + this->sizex) return 0;
- if((int)y < this->y || y >= (uint32_t)this->y + this->sizey) return 0;
- if((int)z < this->z || z >= (uint32_t)this->z + this->sizez) return 0;
+Block* WorldSegment::getBlock(int32_t x, int32_t y, int32_t z){
+ if(x < this->x || x >= this->x + this->sizex) return 0;
+ if(y < this->y || y >= this->y + this->sizey) return 0;
+ if(z < this->z || z >= this->z + this->sizez) return 0;
/*for(uint32_t i=0; i<this->blocks.size(); i++){
Block* b = this->blocks[i];
if(x == b->x && y == b->y && z == b->z)