From 9cbb3a339f98f1737ea78af7f40e1ae7d25027e8 Mon Sep 17 00:00:00 2001 From: Howaner Date: Thu, 24 Apr 2014 20:41:25 +0200 Subject: [PATCH 1/6] Fix armor in survival mode. --- src/ClientHandle.cpp | 2 +- src/Items/ItemArmor.h | 54 ++++++++++++++++++++++++++++ src/Items/ItemHandler.cpp | 7 ++++ src/Items/ItemHandler.h | 30 ++++++++-------- src/UI/SlotArea.cpp | 74 +++++++++++++++++++++++++++++++++++++++ src/UI/SlotArea.h | 7 +++- 6 files changed, 157 insertions(+), 17 deletions(-) create mode 100644 src/Items/ItemArmor.h diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 0f26d41e7..63ae98be4 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1037,7 +1037,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e { HandlePlaceBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, *ItemHandler); } - else if (ItemHandler->IsFood()) + else if (ItemHandler->IsFood() && !m_Player->IsGameModeCreative()) { if (m_Player->IsSatiated()) { diff --git a/src/Items/ItemArmor.h b/src/Items/ItemArmor.h new file mode 100644 index 000000000..0f40ac443 --- /dev/null +++ b/src/Items/ItemArmor.h @@ -0,0 +1,54 @@ + +#pragma once + +#include "ItemHandler.h" +#include "../World.h" + + + + + +class cItemArmorHandler : + public cItemHandler +{ +public: + cItemArmorHandler(int a_ItemType) : + cItemHandler(a_ItemType) + { + } + + virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override + { + int SlotNum = -1; + if (ItemCategory::IsHelmet(a_Item.m_ItemType)) + { + SlotNum = 0; + } + else if (ItemCategory::IsChestPlate(a_Item.m_ItemType)) + { + SlotNum = 1; + } + else if (ItemCategory::IsLeggings(a_Item.m_ItemType)) + { + SlotNum = 2; + } + else if (ItemCategory::IsBoots(a_Item.m_ItemType)) + { + SlotNum = 3; + } + + if (!a_Player->GetInventory().GetArmorSlot(SlotNum).IsEmpty()) + { + return false; + } + + a_Player->GetInventory().SetArmorSlot(SlotNum, a_Item.CopyOne()); + a_Player->GetInventory().SetHotbarSlot(a_Player->GetInventory().GetEquippedSlotNum(), cItem()); + return true; + } + +} ; + + + + diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index 5151eac38..2cb1471aa 100644 --- a/src/Items/ItemHandler.cpp +++ b/src/Items/ItemHandler.cpp @@ -8,6 +8,7 @@ #include "../BlockInServerPluginInterface.h" // Handlers: +#include "ItemArmor.h" #include "ItemBed.h" #include "ItemBoat.h" #include "ItemBow.h" @@ -90,6 +91,12 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType) cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType) { + // Armor + if (ItemCategory::IsArmor(a_ItemType)) + { + return new cItemArmorHandler(a_ItemType); + } + switch(a_ItemType) { default: return new cItemHandler(a_ItemType); diff --git a/src/Items/ItemHandler.h b/src/Items/ItemHandler.h index f3d78335e..4993eac85 100644 --- a/src/Items/ItemHandler.h +++ b/src/Items/ItemHandler.h @@ -21,13 +21,13 @@ class cItemHandler public: cItemHandler(int a_ItemType); - // Force virtual destructor + /** Force virtual destructor */ virtual ~cItemHandler() {} - /// Called when the player tries to use the item (right mouse button). Return false to make the item unusable. DEFAULT: False + /** Called when the player tries to use the item (right mouse button). Return false to make the item unusable. DEFAULT: False */ virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir); - /// Called when the client sends the SHOOT status in the lclk packet + /** Called when the client sends the SHOOT status in the lclk packet */ virtual void OnItemShoot(cPlayer *, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) { UNUSED(a_BlockX); @@ -36,7 +36,7 @@ public: UNUSED(a_BlockFace); } - /// Called every tick while the item is on the player's inventory (Used by maps) - For now, called only for equipped items + /** Called every tick while the item is on the player's inventory (Used by maps) - For now, called only for equipped items */ virtual void OnUpdate(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item) { UNUSED(a_World); @@ -44,16 +44,16 @@ public: UNUSED(a_Item); } - /// Called while the player diggs a block using this item + /** Called while the player diggs a block using this item */ virtual bool OnDiggingBlock(cWorld * a_World, cPlayer * a_Player, const cItem & a_HeldItem, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace); - /// Called when the player destroys a block using this item. This also calls the drop function for the destroyed block + /** Called when the player destroys a block using this item. This also calls the drop function for the destroyed block */ virtual void OnBlockDestroyed(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_X, int a_Y, int a_Z); - /// Called after the player has eaten this item. + /** Called after the player has eaten this item. */ virtual void OnFoodEaten(cWorld *a_World, cPlayer *a_Player, cItem *a_Item); - /// Returns the maximum stack size for a given item + /** Returns the maximum stack size for a given item */ virtual char GetMaxStackSize(void); struct FoodInfo @@ -70,22 +70,22 @@ public: } } ; - /// Returns the FoodInfo for this item. (FoodRecovery, Saturation and PoisionChance) + /** Returns the FoodInfo for this item. (FoodRecovery, Saturation and PoisionChance) */ virtual FoodInfo GetFoodInfo(); - /// Lets the player eat a selected item. Returns true if the player ate the item + /** Lets the player eat a selected item. Returns true if the player ate the item */ virtual bool EatItem(cPlayer *a_Player, cItem *a_Item); - /// Indicates if this item is a tool + /** Indicates if this item is a tool */ virtual bool IsTool(void); - /// Indicates if this item is food + /** Indicates if this item is food */ virtual bool IsFood(void); - /// Blocks simply get placed + /** Blocks simply get placed */ virtual bool IsPlaceable(void); - /** Called before a block is placed into a world. + /** Called before a block is placed into a world. The handler should return true to allow placement, false to refuse. Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block. */ @@ -96,7 +96,7 @@ public: BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta ); - /// Returns whether this tool/item can harvest a specific block (e.g. wooden pickaxe can harvest stone, but wood can´t) DEFAULT: False + /** Returns whether this tool/item can harvest a specific block (e.g. wooden pickaxe can harvest stone, but wood can�t) DEFAULT: False */ virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType); static cItemHandler * GetItemHandler(int a_ItemType); diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 2d58388b1..ef4cf17cd 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -1091,6 +1091,80 @@ void cSlotAreaArmor::DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bo +void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) +{ + ASSERT((a_SlotNum >= 0) && (a_SlotNum < GetNumSlots())); + + bool bAsync = false; + if (GetSlot(a_SlotNum, a_Player) == NULL) + { + LOGWARNING("GetSlot(%d) returned NULL! Ignoring click", a_SlotNum); + return; + } + + if ((a_ClickAction == caShiftLeftClick) || (a_ClickAction == caShiftRightClick)) + { + ShiftClicked(a_Player, a_SlotNum, a_ClickedItem); + return; + } + + //Armors haven't a dbl click + if (a_ClickAction == caDblClick) + { + return; + } + + cItem Slot(*GetSlot(a_SlotNum, a_Player)); + if (!Slot.IsSameType(a_ClickedItem)) + { + LOGWARNING("*** Window lost sync at item %d in SlotArea with %d items ***", a_SlotNum, m_NumSlots); + LOGWARNING("My item: %s", ItemToFullString(Slot).c_str()); + LOGWARNING("Their item: %s", ItemToFullString(a_ClickedItem).c_str()); + bAsync = true; + } + cItem & DraggingItem = a_Player.GetDraggingItem(); + if ((a_ClickAction != caRightClick) && (a_ClickAction != caLeftClick)) + { + LOGWARNING("SlotArea: Unhandled click action: %d (%s)", a_ClickAction, ClickActionToString(a_ClickAction)); + m_ParentWindow.BroadcastWholeWindow(); + return; + } + + if (DraggingItem.IsEmpty() || CanPlaceInSlot(a_SlotNum, DraggingItem)) + { + // Swap contents + cItem tmp(DraggingItem); + DraggingItem = Slot; + Slot = tmp; + } + + SetSlot(a_SlotNum, a_Player, Slot); + if (bAsync) + { + m_ParentWindow.BroadcastWholeWindow(); + } +} + + + + + +bool cSlotAreaArmor::CanPlaceInSlot(int a_SlotNum, const cItem & a_Item) +{ + switch (a_SlotNum) + { + case 0: return ItemCategory::IsHelmet (a_Item.m_ItemType); + case 1: return ItemCategory::IsChestPlate(a_Item.m_ItemType); + case 2: return ItemCategory::IsLeggings (a_Item.m_ItemType); + case 3: return ItemCategory::IsBoots (a_Item.m_ItemType); + } + return false; +} + + + + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // cSlotAreaItemGrid: diff --git a/src/UI/SlotArea.h b/src/UI/SlotArea.h index bab1098bb..254722822 100644 --- a/src/UI/SlotArea.h +++ b/src/UI/SlotArea.h @@ -145,8 +145,13 @@ public: { } - // Distributing the stack is allowed only for compatible items (helmets into helmet slot etc.) + /** Distributing the stack is allowed only for compatible items (helmets into helmet slot etc.) */ virtual void DistributeStack(cItem & a_ItemStack, cPlayer & a_Player, bool a_ShouldApply, bool a_KeepEmptySlots) override; + + /** Called when a player clicks in the window. Parameters taken from the click packet. */ + virtual void Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_ClickAction, const cItem & a_ClickedItem) override; + + bool CanPlaceInSlot(int a_SlotNum, const cItem & a_Item); } ; From 449cf77420900e44d3b947a95efabdd78d0c3691 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 24 Apr 2014 21:29:59 +0200 Subject: [PATCH 2/6] Changed cByteBuffer constructor to take a size_t instead of int. --- src/ByteBuffer.cpp | 2 +- src/ByteBuffer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ByteBuffer.cpp b/src/ByteBuffer.cpp index 1893d89a8..c634dc308 100644 --- a/src/ByteBuffer.cpp +++ b/src/ByteBuffer.cpp @@ -143,7 +143,7 @@ protected: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // cByteBuffer: -cByteBuffer::cByteBuffer(int a_BufferSize) : +cByteBuffer::cByteBuffer(size_t a_BufferSize) : m_Buffer(new char[a_BufferSize + 1]), m_BufferSize(a_BufferSize + 1), #ifdef _DEBUG diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h index 1915467f3..44f43e17f 100644 --- a/src/ByteBuffer.h +++ b/src/ByteBuffer.h @@ -27,7 +27,7 @@ their own synchronization. class cByteBuffer { public: - cByteBuffer(int a_BufferSize); + cByteBuffer(size_t a_BufferSize); ~cByteBuffer(); /// Writes the bytes specified to the ringbuffer. Returns true if successful, false if not From 376dc880b37e1b104c86efebef0f294c34ca3c42 Mon Sep 17 00:00:00 2001 From: Howaner Date: Thu, 24 Apr 2014 23:03:04 +0200 Subject: [PATCH 3/6] Add armor to switch() in ItemHandler.cpp --- src/Items/ItemHandler.cpp | 31 +++++++++++++++++++++++++------ src/UI/SlotArea.cpp | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index 2cb1471aa..ce9593a70 100644 --- a/src/Items/ItemHandler.cpp +++ b/src/Items/ItemHandler.cpp @@ -91,12 +91,6 @@ cItemHandler * cItemHandler::GetItemHandler(int a_ItemType) cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType) { - // Armor - if (ItemCategory::IsArmor(a_ItemType)) - { - return new cItemArmorHandler(a_ItemType); - } - switch(a_ItemType) { default: return new cItemHandler(a_ItemType); @@ -229,6 +223,31 @@ cItemHandler *cItemHandler::CreateItemHandler(int a_ItemType) { return new cItemFoodHandler(a_ItemType); } + + // Armor: + case E_ITEM_LEATHER_CAP: + case E_ITEM_GOLD_HELMET: + case E_ITEM_CHAIN_HELMET: + case E_ITEM_IRON_HELMET: + case E_ITEM_DIAMOND_HELMET: + case E_ITEM_LEATHER_TUNIC: + case E_ITEM_GOLD_CHESTPLATE: + case E_ITEM_CHAIN_CHESTPLATE: + case E_ITEM_IRON_CHESTPLATE: + case E_ITEM_DIAMOND_CHESTPLATE: + case E_ITEM_LEATHER_PANTS: + case E_ITEM_GOLD_LEGGINGS: + case E_ITEM_CHAIN_LEGGINGS: + case E_ITEM_IRON_LEGGINGS: + case E_ITEM_DIAMOND_LEGGINGS: + case E_ITEM_LEATHER_BOOTS: + case E_ITEM_GOLD_BOOTS: + case E_ITEM_CHAIN_BOOTS: + case E_ITEM_IRON_BOOTS: + case E_ITEM_DIAMOND_BOOTS: + { + return new cItemArmorHandler(a_ItemType); + } } } diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index ef4cf17cd..87b4032e0 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -1108,7 +1108,7 @@ void cSlotAreaArmor::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a_C return; } - //Armors haven't a dbl click + // Armors haven't a dbl click if (a_ClickAction == caDblClick) { return; From cee70390fae9c240337186e50445e50518ccdba8 Mon Sep 17 00:00:00 2001 From: Howaner Date: Fri, 25 Apr 2014 00:09:22 +0200 Subject: [PATCH 4/6] Add unkown armor warning and fix armor stacks. --- src/Items/ItemArmor.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Items/ItemArmor.h b/src/Items/ItemArmor.h index 0f40ac443..a786990fc 100644 --- a/src/Items/ItemArmor.h +++ b/src/Items/ItemArmor.h @@ -19,7 +19,7 @@ public: virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override { - int SlotNum = -1; + int SlotNum; if (ItemCategory::IsHelmet(a_Item.m_ItemType)) { SlotNum = 0; @@ -36,6 +36,11 @@ public: { SlotNum = 3; } + else + { + LOGWARNING("Used unknown armor: %i", a_Item.m_ItemType); + return false; + } if (!a_Player->GetInventory().GetArmorSlot(SlotNum).IsEmpty()) { @@ -43,7 +48,14 @@ public: } a_Player->GetInventory().SetArmorSlot(SlotNum, a_Item.CopyOne()); - a_Player->GetInventory().SetHotbarSlot(a_Player->GetInventory().GetEquippedSlotNum(), cItem()); + + cItem Item(a_Item); + Item.m_ItemCount--; + if (Item.m_ItemCount <= 0) + { + Item.Empty(); + } + a_Player->GetInventory().SetHotbarSlot(a_Player->GetInventory().GetEquippedSlotNum(), Item); return true; } From ccd9023202e2a9f97780fd96438c024a83618052 Mon Sep 17 00:00:00 2001 From: Howaner Date: Fri, 25 Apr 2014 00:10:52 +0200 Subject: [PATCH 5/6] Add commit what the code is doing. --- src/Items/ItemArmor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Items/ItemArmor.h b/src/Items/ItemArmor.h index a786990fc..08cddb1ad 100644 --- a/src/Items/ItemArmor.h +++ b/src/Items/ItemArmor.h @@ -17,6 +17,7 @@ public: { } + /** Move the armor to the armor slot of the player's inventory */ virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override { int SlotNum; From e47dab84f3f6606d6d6e95774b16d7d4e8d7daa6 Mon Sep 17 00:00:00 2001 From: archshift Date: Fri, 25 Apr 2014 09:56:15 -0700 Subject: [PATCH 6/6] Cmake generated projects for IDEs include headers in project files. --- src/BlockEntities/CMakeLists.txt | 1 + src/CMakeLists.txt | 1 + src/Entities/CMakeLists.txt | 1 + src/Generating/CMakeLists.txt | 1 + src/Generating/Prefabs/CMakeLists.txt | 1 + src/HTTPServer/CMakeLists.txt | 1 + src/Mobs/CMakeLists.txt | 1 + src/OSSupport/CMakeLists.txt | 1 + src/Protocol/CMakeLists.txt | 1 + src/Simulator/CMakeLists.txt | 1 + src/UI/CMakeLists.txt | 1 + src/WorldStorage/CMakeLists.txt | 1 + 12 files changed, 12 insertions(+) diff --git a/src/BlockEntities/CMakeLists.txt b/src/BlockEntities/CMakeLists.txt index 920767f5c..3e3d17f86 100644 --- a/src/BlockEntities/CMakeLists.txt +++ b/src/BlockEntities/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(BlockEntities ${SOURCE}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 30e9dbfd4..9cc5fcb1e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -123,6 +123,7 @@ if (NOT MSVC) file(GLOB SOURCE "*.cpp" + "*.h" ) list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp") diff --git a/src/Entities/CMakeLists.txt b/src/Entities/CMakeLists.txt index 85cc45494..c9ca44d38 100644 --- a/src/Entities/CMakeLists.txt +++ b/src/Entities/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(Entities ${SOURCE}) diff --git a/src/Generating/CMakeLists.txt b/src/Generating/CMakeLists.txt index 1147744c0..3dacb5066 100644 --- a/src/Generating/CMakeLists.txt +++ b/src/Generating/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(Generating ${SOURCE}) diff --git a/src/Generating/Prefabs/CMakeLists.txt b/src/Generating/Prefabs/CMakeLists.txt index 1e60447e7..a1f09112d 100644 --- a/src/Generating/Prefabs/CMakeLists.txt +++ b/src/Generating/Prefabs/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(Generating_Prefabs ${SOURCE}) diff --git a/src/HTTPServer/CMakeLists.txt b/src/HTTPServer/CMakeLists.txt index 3badc669f..dc894368d 100644 --- a/src/HTTPServer/CMakeLists.txt +++ b/src/HTTPServer/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(HTTPServer ${SOURCE}) diff --git a/src/Mobs/CMakeLists.txt b/src/Mobs/CMakeLists.txt index 87fbfd2fc..53c265803 100644 --- a/src/Mobs/CMakeLists.txt +++ b/src/Mobs/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(Mobs ${SOURCE}) diff --git a/src/OSSupport/CMakeLists.txt b/src/OSSupport/CMakeLists.txt index 497cd0ba3..dee60b450 100644 --- a/src/OSSupport/CMakeLists.txt +++ b/src/OSSupport/CMakeLists.txt @@ -5,6 +5,7 @@ project (MCServer) include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(OSSupport ${SOURCE}) diff --git a/src/Protocol/CMakeLists.txt b/src/Protocol/CMakeLists.txt index 107b79627..849ec27ca 100644 --- a/src/Protocol/CMakeLists.txt +++ b/src/Protocol/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(Protocol ${SOURCE}) diff --git a/src/Simulator/CMakeLists.txt b/src/Simulator/CMakeLists.txt index 4f3f1ad0e..b2a29d45c 100644 --- a/src/Simulator/CMakeLists.txt +++ b/src/Simulator/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(Simulator ${SOURCE}) diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt index cef2a9f35..5b5b8cc18 100644 --- a/src/UI/CMakeLists.txt +++ b/src/UI/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(UI ${SOURCE}) diff --git a/src/WorldStorage/CMakeLists.txt b/src/WorldStorage/CMakeLists.txt index 2c83c4662..2844f7fe5 100644 --- a/src/WorldStorage/CMakeLists.txt +++ b/src/WorldStorage/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") file(GLOB SOURCE "*.cpp" + "*.h" ) add_library(WorldStorage ${SOURCE})