diff options
| author | Caldfir | 2012-04-30 17:36:03 -0700 |
|---|---|---|
| committer | Caldfir | 2012-04-30 17:36:03 -0700 |
| commit | 8b43f056d79e62a6300842692fa2892bf2d81d6e (patch) | |
| tree | 45bc46cb30b26ab024b6069bf3fbc8e2300cb0aa | |
| parent | 2fda3e5e828f085de1e533ae437cf7e649752da7 (diff) | |
| download | stonesense-8b43f056d79e62a6300842692fa2892bf2d81d6e.tar.gz stonesense-8b43f056d79e62a6300842692fa2892bf2d81d6e.tar.bz2 stonesense-8b43f056d79e62a6300842692fa2892bf2d81d6e.tar.xz | |
Fixed an erroneous double-multiplication by the size of a cell which was causing some issues elsewhere.
| -rw-r--r-- | MapLoading.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/MapLoading.cpp b/MapLoading.cpp index 91e4117..14e945d 100644 --- a/MapLoading.cpp +++ b/MapLoading.cpp @@ -772,22 +772,22 @@ WorldSegment* ReadMapSegment(int x, int y, int z, int sizex, int sizey, int size int cellDimX, cellDimY, cellDimZ;
Maps::getSize((unsigned int &)cellDimX, (unsigned int &)cellDimY, (unsigned int &)cellDimZ);
//Store these
- cellDimX = cellDimX * 16;
- cellDimY = cellDimY * 16;
+ cellDimX = cellDimX * CELLEDGESIZE;
+ cellDimY = cellDimY * CELLEDGESIZE;
cellDimZ = cellDimZ;
config.cellDimX = cellDimX;
config.cellDimY = cellDimY;
config.cellDimZ = cellDimZ;
//bound view to world
- if(x > cellDimX * CELLEDGESIZE -sizex/2) DisplayedSegmentX = x = cellDimX * CELLEDGESIZE -sizex/2;
- if(y > cellDimY * CELLEDGESIZE -sizey/2) DisplayedSegmentY = y = cellDimY * CELLEDGESIZE -sizey/2;
+ if(x > cellDimX -sizex/2) DisplayedSegmentX = x = cellDimX -sizex/2;
+ if(y > cellDimY -sizey/2) DisplayedSegmentY = y = cellDimY -sizey/2;
if(x < -sizex/2) DisplayedSegmentX = x = -sizex/2;
if(y < -sizey/2) DisplayedSegmentY = y = -sizey/2;
//setup new world segment
WorldSegment* segment = new WorldSegment(x,y,z,sizex,sizey,sizez);
- segment->regionSize.x = cellDimX * CELLEDGESIZE;
- segment->regionSize.y = cellDimY * CELLEDGESIZE;
+ segment->regionSize.x = cellDimX;
+ segment->regionSize.y = cellDimY;
segment->regionSize.z = cellDimZ;
segment->rotation = DisplayedRotation;
|
