浏览代码

fix compiler issues

Kolja Strohm 3 年之前
父节点
当前提交
ae66415cca
共有 4 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      FactoryCraft/BasicBlocks.cpp
  2. 2 2
      FactoryCraft/Block.cpp
  3. 1 1
      FactoryCraft/Block.h
  4. 1 1
      FactoryCraft/Chunk.cpp

+ 1 - 1
FactoryCraft/BasicBlocks.cpp

@@ -8,7 +8,7 @@
 
 
 BasicBlock::BasicBlock( ItemType *zTool, Framework::Vec3<int> pos, Framework::Textur *t )
-    : Block( zTool, pos )
+    : Block( zTool, pos, false )
 {
     Model3DData *data = 0;
     if( Framework::zM3DRegister()->hatModel( "cube" ) )

+ 2 - 2
FactoryCraft/Block.cpp

@@ -3,8 +3,8 @@
 #include "Globals.h"
 
 
-Block::Block( ItemType *zTool, Framework::Vec3<int> pos )
-    : Inventory( pos )
+Block::Block( ItemType *zTool, Framework::Vec3<int> pos, bool hasInventory )
+    : Inventory( pos, hasInventory )
 {
     visible = false;
     transparent = false;

+ 1 - 1
FactoryCraft/Block.h

@@ -27,7 +27,7 @@ private:
     Block *zNeighbours[ 6 ];
 
 public:
-    Block( ItemType *zTool, Vec3<int> position );
+    Block( ItemType *zTool, Vec3<int> position, bool hasInventory );
     virtual ~Block();
 
     bool updateVisibility();

+ 1 - 1
FactoryCraft/Chunk.cpp

@@ -36,7 +36,7 @@ Chunk::~Chunk()
 
 Block *Chunk::zBlockNeighbor( Framework::Vec3<int> location )
 {
-    if( location.x >= 0 && location.x < CHUNK_SIZE && location.y <= 0 && location.y < CHUNK_SIZE && location.z >= 0 && location.z < WORLD_HEIGHT )
+    if( location.x >= 0 && location.x < CHUNK_SIZE && location.y >= 0 && location.y < CHUNK_SIZE && location.z >= 0 && location.z < WORLD_HEIGHT )
         return blocks[ (location.x * CHUNK_SIZE + location.y) * WORLD_HEIGHT + location.z ];
     if( location.z >= 0 && location.z < WORLD_HEIGHT )
         return currentGame->zBlockAt( { location.x + this->location.x - CHUNK_SIZE / 2, location.y + this->location.y - CHUNK_SIZE / 2, location.z }, dimensionId );