Sfoglia il codice sorgente

placed blocks are now interactable

Kolja Strohm 3 anni fa
parent
commit
9b5808848e
2 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 2 0
      FactoryCraft/Block.cpp
  2. 1 0
      FactoryCraft/Block.h

+ 2 - 0
FactoryCraft/Block.cpp

@@ -54,6 +54,7 @@ BasicBlockItem::BasicBlockItem( const ItemType* zType, const char* name )
     hardness = 0;
     toolId = 0;
     speedModifier = 0;
+    interactable = 0;
 }
 
 
@@ -74,6 +75,7 @@ void BasicBlockItemType::loadSuperItem( Item* zItem, Framework::StreamReader* zR
     zReader->lese( (char*)&item->hardness, 4 );
     zReader->lese( (char*)&item->toolId, 4 );
     zReader->lese( (char*)&item->speedModifier, 4 );
+    zReader->lese( (char*)&item->interactable, 1 );
 }
 
 Framework::Model3DData* BasicBlockItemType::getItemModel() const

+ 1 - 0
FactoryCraft/Block.h

@@ -49,6 +49,7 @@ protected:
     float hardness;
     int toolId;
     float speedModifier;
+    bool interactable;
 
 public:
     BasicBlockItem( const ItemType* zType, const char* name );