From 1929d16724de6f451c9485076b4091cbc457916c Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 14 Jul 2014 20:26:36 +0100 Subject: [PATCH 1/8] Added first implementation of cClearMetaOnDrop --- src/Blocks/BlockLadder.h | 5 +++-- src/Blocks/ClearMetaOnDrop.h | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/Blocks/ClearMetaOnDrop.h diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h index a605edf3..1af2be06 100644 --- a/src/Blocks/BlockLadder.h +++ b/src/Blocks/BlockLadder.h @@ -3,17 +3,18 @@ #include "BlockHandler.h" #include "../World.h" +#include "ClearMetaOnDrop.h" class cBlockLadderHandler : - public cMetaRotator + public cClearMetaOnDrop > { public: cBlockLadderHandler(BLOCKTYPE a_BlockType) - : cMetaRotator(a_BlockType) + : cClearMetaOnDrop >(a_BlockType) { } diff --git a/src/Blocks/ClearMetaOnDrop.h b/src/Blocks/ClearMetaOnDrop.h new file mode 100644 index 00000000..21b987f2 --- /dev/null +++ b/src/Blocks/ClearMetaOnDrop.h @@ -0,0 +1,18 @@ + +#pragma once + +template +class cClearMetaOnDrop : public Base +{ +public: + + cClearMetaOnDrop(BLOCKTYPE a_BlockType) : + Base(a_BlockType) + {} + + virtual ~cClearMetaOnDrop() {} + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + a_Pickups.push_back(cItem(this->m_BlockType, 1, 0)); + } +}; From 515c3cbc67816fb770ff7e32bd593bd55c26788c Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 14 Jul 2014 20:28:16 +0100 Subject: [PATCH 2/8] Added cClearOnDrop Mixin to cPumpkin --- src/Blocks/BlockPumpkin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Blocks/BlockPumpkin.h b/src/Blocks/BlockPumpkin.h index ac2b9817..f4022735 100644 --- a/src/Blocks/BlockPumpkin.h +++ b/src/Blocks/BlockPumpkin.h @@ -6,11 +6,11 @@ class cBlockPumpkinHandler : - public cMetaRotator + public cClearMetaOnDrop > { public: cBlockPumpkinHandler(BLOCKTYPE a_BlockType) - : cMetaRotator(a_BlockType) + : cClearMetaOnDrop >(a_BlockType) { } From 093b5c6456fd2c635441630c87853a3a00008af8 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 14 Jul 2014 20:33:30 +0100 Subject: [PATCH 3/8] Simplified ClearMetaOnDrop --- src/Blocks/ClearMetaOnDrop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Blocks/ClearMetaOnDrop.h b/src/Blocks/ClearMetaOnDrop.h index 21b987f2..e6d26863 100644 --- a/src/Blocks/ClearMetaOnDrop.h +++ b/src/Blocks/ClearMetaOnDrop.h @@ -13,6 +13,6 @@ public: virtual ~cClearMetaOnDrop() {} virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override { - a_Pickups.push_back(cItem(this->m_BlockType, 1, 0)); + a_Pickups.push_back(cItem(this->m_BlockType)); } }; From 333f4f982cbd24ffcb376594eddef439b3f05e9e Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 14 Jul 2014 20:50:56 +0100 Subject: [PATCH 4/8] Converted some blockhandlers to use cClearMetaOnDrop --- src/Blocks/BlockBrewingStand.h | 10 +++------- src/Blocks/BlockCobWeb.h | 10 ++-------- src/Blocks/BlockFlowerPot.h | 9 ++------- src/Blocks/BlockLilypad.h | 9 ++------- src/Blocks/BlockMycelium.h | 8 ++------ src/Blocks/BlockRedstone.h | 11 ++--------- src/Blocks/BlockRedstoneLamp.h | 9 ++------- src/Blocks/BlockRedstoneRepeater.h | 13 +++---------- src/Blocks/BlockStone.h | 9 +++------ 9 files changed, 21 insertions(+), 67 deletions(-) diff --git a/src/Blocks/BlockBrewingStand.h b/src/Blocks/BlockBrewingStand.h index 57642bcb..77e383b1 100644 --- a/src/Blocks/BlockBrewingStand.h +++ b/src/Blocks/BlockBrewingStand.h @@ -2,25 +2,21 @@ #pragma once #include "BlockHandler.h" +#include "ClearMetaOnDrop.h" class cBlockBrewingStandHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockBrewingStandHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - a_Pickups.push_back(cItem(E_ITEM_BREWING_STAND, 1, 0)); - } - virtual bool IsUseable() override { return true; diff --git a/src/Blocks/BlockCobWeb.h b/src/Blocks/BlockCobWeb.h index 982bfaa3..29a6b815 100644 --- a/src/Blocks/BlockCobWeb.h +++ b/src/Blocks/BlockCobWeb.h @@ -10,19 +10,13 @@ class cBlockCobWebHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockCobWebHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } - - - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_Meta) override - { - a_Pickups.push_back(cItem(E_ITEM_STRING, 1, 0)); - } } ; diff --git a/src/Blocks/BlockFlowerPot.h b/src/Blocks/BlockFlowerPot.h index fc75ef63..39fbe1bd 100644 --- a/src/Blocks/BlockFlowerPot.h +++ b/src/Blocks/BlockFlowerPot.h @@ -9,18 +9,13 @@ class cBlockFlowerPotHandler : - public cBlockEntityHandler + public cClearMetaOnDrop { public: cBlockFlowerPotHandler(BLOCKTYPE a_BlockType) : - cBlockEntityHandler(a_BlockType) + cClearMetaOnDrop(a_BlockType) { } - - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - a_Pickups.push_back(cItem(E_ITEM_FLOWER_POT, 1, 0)); - } } ; diff --git a/src/Blocks/BlockLilypad.h b/src/Blocks/BlockLilypad.h index 2dd4ec76..fc37f360 100644 --- a/src/Blocks/BlockLilypad.h +++ b/src/Blocks/BlockLilypad.h @@ -8,19 +8,14 @@ class cBlockLilypadHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockLilypadHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - // Reset meta to zero - a_Pickups.push_back(cItem(E_BLOCK_LILY_PAD, 1, 0)); - } }; diff --git a/src/Blocks/BlockMycelium.h b/src/Blocks/BlockMycelium.h index 2a8ef5fc..4d4a0bb4 100644 --- a/src/Blocks/BlockMycelium.h +++ b/src/Blocks/BlockMycelium.h @@ -8,20 +8,16 @@ class cBlockMyceliumHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockMyceliumHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } // TODO: Add Mycel Spread - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - a_Pickups.push_back(cItem(E_BLOCK_DIRT, 1, 0)); - } virtual const char * GetStepSound(void) override { diff --git a/src/Blocks/BlockRedstone.h b/src/Blocks/BlockRedstone.h index a898c9ac..6dbf46a5 100644 --- a/src/Blocks/BlockRedstone.h +++ b/src/Blocks/BlockRedstone.h @@ -9,11 +9,11 @@ class cBlockRedstoneHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockRedstoneHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } @@ -22,13 +22,6 @@ public: { return ((a_RelY > 0) && cBlockInfo::FullyOccupiesVoxel(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ))); } - - - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - // Reset meta to 0 - a_Pickups.push_back(cItem(E_ITEM_REDSTONE_DUST, 1)); - } } ; diff --git a/src/Blocks/BlockRedstoneLamp.h b/src/Blocks/BlockRedstoneLamp.h index 69a2b27c..4b0ca5b3 100644 --- a/src/Blocks/BlockRedstoneLamp.h +++ b/src/Blocks/BlockRedstoneLamp.h @@ -8,18 +8,13 @@ class cBlockRedstoneLampHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockRedstoneLampHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } - - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - a_Pickups.push_back(cItem(E_BLOCK_REDSTONE_LAMP_OFF, 1, 0)); - } }; diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h index fe6cd21b..1e9c00f2 100644 --- a/src/Blocks/BlockRedstoneRepeater.h +++ b/src/Blocks/BlockRedstoneRepeater.h @@ -4,16 +4,16 @@ #include "BlockHandler.h" #include "Chunk.h" #include "MetaRotator.h" - +#include "ClearMetaOnDrop.h" class cBlockRedstoneRepeaterHandler : - public cMetaRotator + public cClearMetaOnDrop > { public: cBlockRedstoneRepeaterHandler(BLOCKTYPE a_BlockType) - : cMetaRotator(a_BlockType) + : cClearMetaOnDrop >(a_BlockType) { } @@ -44,13 +44,6 @@ public: } - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - // Reset meta to 0 - a_Pickups.push_back(cItem(E_ITEM_REDSTONE_REPEATER, 1, 0)); - } - - virtual bool IsUseable(void) override { return true; diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h index cd5230f4..697ab031 100644 --- a/src/Blocks/BlockStone.h +++ b/src/Blocks/BlockStone.h @@ -2,24 +2,21 @@ #pragma once #include "BlockHandler.h" +#include "ClearMetaOnDrop.h" class cBlockStoneHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockStoneHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0)); - } } ; From 2cd3443fbbb498f06227ed44db0c6a749cafdb76 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 14 Jul 2014 21:21:17 +0100 Subject: [PATCH 5/8] Added documentation --- src/Blocks/ClearMetaOnDrop.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Blocks/ClearMetaOnDrop.h b/src/Blocks/ClearMetaOnDrop.h index e6d26863..3f8c3381 100644 --- a/src/Blocks/ClearMetaOnDrop.h +++ b/src/Blocks/ClearMetaOnDrop.h @@ -1,6 +1,12 @@ #pragma once +// mixin for use to clear meta values when the block is converted to a pickup + +// Usage: inherit from this class, passing the parent class as the parameter Base +// For example to use in class Foo which should inherit Bar use +// class Foo : public cClearMetaOnDrop; + template class cClearMetaOnDrop : public Base { From 8fd636aa7235698263e3b85388a4f6373cbedb76 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 14 Jul 2014 23:59:24 +0100 Subject: [PATCH 6/8] Revert "Converted some blockhandlers to use cClearMetaOnDrop" This reverts commit 333f4f982cbd24ffcb376594eddef439b3f05e9e. --- src/Blocks/BlockBrewingStand.h | 10 +++++++--- src/Blocks/BlockCobWeb.h | 10 ++++++++-- src/Blocks/BlockFlowerPot.h | 9 +++++++-- src/Blocks/BlockLilypad.h | 9 +++++++-- src/Blocks/BlockMycelium.h | 8 ++++++-- src/Blocks/BlockRedstone.h | 11 +++++++++-- src/Blocks/BlockRedstoneLamp.h | 9 +++++++-- src/Blocks/BlockRedstoneRepeater.h | 13 ++++++++++--- src/Blocks/BlockStone.h | 9 ++++++--- 9 files changed, 67 insertions(+), 21 deletions(-) diff --git a/src/Blocks/BlockBrewingStand.h b/src/Blocks/BlockBrewingStand.h index 77e383b1..57642bcb 100644 --- a/src/Blocks/BlockBrewingStand.h +++ b/src/Blocks/BlockBrewingStand.h @@ -2,21 +2,25 @@ #pragma once #include "BlockHandler.h" -#include "ClearMetaOnDrop.h" class cBlockBrewingStandHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockBrewingStandHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + a_Pickups.push_back(cItem(E_ITEM_BREWING_STAND, 1, 0)); + } + virtual bool IsUseable() override { return true; diff --git a/src/Blocks/BlockCobWeb.h b/src/Blocks/BlockCobWeb.h index 29a6b815..982bfaa3 100644 --- a/src/Blocks/BlockCobWeb.h +++ b/src/Blocks/BlockCobWeb.h @@ -10,13 +10,19 @@ class cBlockCobWebHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockCobWebHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } + + + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_Meta) override + { + a_Pickups.push_back(cItem(E_ITEM_STRING, 1, 0)); + } } ; diff --git a/src/Blocks/BlockFlowerPot.h b/src/Blocks/BlockFlowerPot.h index 39fbe1bd..fc75ef63 100644 --- a/src/Blocks/BlockFlowerPot.h +++ b/src/Blocks/BlockFlowerPot.h @@ -9,13 +9,18 @@ class cBlockFlowerPotHandler : - public cClearMetaOnDrop + public cBlockEntityHandler { public: cBlockFlowerPotHandler(BLOCKTYPE a_BlockType) : - cClearMetaOnDrop(a_BlockType) + cBlockEntityHandler(a_BlockType) { } + + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + a_Pickups.push_back(cItem(E_ITEM_FLOWER_POT, 1, 0)); + } } ; diff --git a/src/Blocks/BlockLilypad.h b/src/Blocks/BlockLilypad.h index fc37f360..2dd4ec76 100644 --- a/src/Blocks/BlockLilypad.h +++ b/src/Blocks/BlockLilypad.h @@ -8,14 +8,19 @@ class cBlockLilypadHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockLilypadHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + // Reset meta to zero + a_Pickups.push_back(cItem(E_BLOCK_LILY_PAD, 1, 0)); + } }; diff --git a/src/Blocks/BlockMycelium.h b/src/Blocks/BlockMycelium.h index 4d4a0bb4..2a8ef5fc 100644 --- a/src/Blocks/BlockMycelium.h +++ b/src/Blocks/BlockMycelium.h @@ -8,16 +8,20 @@ class cBlockMyceliumHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockMyceliumHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } // TODO: Add Mycel Spread + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + a_Pickups.push_back(cItem(E_BLOCK_DIRT, 1, 0)); + } virtual const char * GetStepSound(void) override { diff --git a/src/Blocks/BlockRedstone.h b/src/Blocks/BlockRedstone.h index 6dbf46a5..a898c9ac 100644 --- a/src/Blocks/BlockRedstone.h +++ b/src/Blocks/BlockRedstone.h @@ -9,11 +9,11 @@ class cBlockRedstoneHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockRedstoneHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } @@ -22,6 +22,13 @@ public: { return ((a_RelY > 0) && cBlockInfo::FullyOccupiesVoxel(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ))); } + + + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + // Reset meta to 0 + a_Pickups.push_back(cItem(E_ITEM_REDSTONE_DUST, 1)); + } } ; diff --git a/src/Blocks/BlockRedstoneLamp.h b/src/Blocks/BlockRedstoneLamp.h index 4b0ca5b3..69a2b27c 100644 --- a/src/Blocks/BlockRedstoneLamp.h +++ b/src/Blocks/BlockRedstoneLamp.h @@ -8,13 +8,18 @@ class cBlockRedstoneLampHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockRedstoneLampHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } + + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + a_Pickups.push_back(cItem(E_BLOCK_REDSTONE_LAMP_OFF, 1, 0)); + } }; diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h index 1e9c00f2..fe6cd21b 100644 --- a/src/Blocks/BlockRedstoneRepeater.h +++ b/src/Blocks/BlockRedstoneRepeater.h @@ -4,16 +4,16 @@ #include "BlockHandler.h" #include "Chunk.h" #include "MetaRotator.h" -#include "ClearMetaOnDrop.h" + class cBlockRedstoneRepeaterHandler : - public cClearMetaOnDrop > + public cMetaRotator { public: cBlockRedstoneRepeaterHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop >(a_BlockType) + : cMetaRotator(a_BlockType) { } @@ -44,6 +44,13 @@ public: } + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + // Reset meta to 0 + a_Pickups.push_back(cItem(E_ITEM_REDSTONE_REPEATER, 1, 0)); + } + + virtual bool IsUseable(void) override { return true; diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h index 697ab031..cd5230f4 100644 --- a/src/Blocks/BlockStone.h +++ b/src/Blocks/BlockStone.h @@ -2,21 +2,24 @@ #pragma once #include "BlockHandler.h" -#include "ClearMetaOnDrop.h" class cBlockStoneHandler : - public cClearMetaOnDrop + public cBlockHandler { public: cBlockStoneHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : cBlockHandler(a_BlockType) { } + virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override + { + a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0)); + } } ; From 0e5fa2662aa2b559335a25ee78cd086f795be79e Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 15 Jul 2014 00:01:16 +0100 Subject: [PATCH 7/8] COnverted Lilypad back to mixin --- src/Blocks/BlockLilypad.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Blocks/BlockLilypad.h b/src/Blocks/BlockLilypad.h index 2dd4ec76..c25f150c 100644 --- a/src/Blocks/BlockLilypad.h +++ b/src/Blocks/BlockLilypad.h @@ -8,19 +8,13 @@ class cBlockLilypadHandler : - public cBlockHandler + public cClearMetaOnDrop { public: cBlockLilypadHandler(BLOCKTYPE a_BlockType) - : cBlockHandler(a_BlockType) + : cClearMetaOnDrop(a_BlockType) { } - - virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override - { - // Reset meta to zero - a_Pickups.push_back(cItem(E_BLOCK_LILY_PAD, 1, 0)); - } }; From 01a31a1872bb7c33d5a4d0a13dae083c4ef7792e Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 15 Jul 2014 12:27:36 +0100 Subject: [PATCH 8/8] Added super typedef --- src/Blocks/BlockLadder.h | 3 ++- src/Blocks/BlockLilypad.h | 3 ++- src/Blocks/BlockPumpkin.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Blocks/BlockLadder.h b/src/Blocks/BlockLadder.h index 1af2be06..211bbdd9 100644 --- a/src/Blocks/BlockLadder.h +++ b/src/Blocks/BlockLadder.h @@ -12,9 +12,10 @@ class cBlockLadderHandler : public cClearMetaOnDrop > { + typedef cClearMetaOnDrop > super; public: cBlockLadderHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop >(a_BlockType) + : super(a_BlockType) { } diff --git a/src/Blocks/BlockLilypad.h b/src/Blocks/BlockLilypad.h index c25f150c..1320174f 100644 --- a/src/Blocks/BlockLilypad.h +++ b/src/Blocks/BlockLilypad.h @@ -10,9 +10,10 @@ class cBlockLilypadHandler : public cClearMetaOnDrop { +typedef cClearMetaOnDrop super; public: cBlockLilypadHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop(a_BlockType) + : super(a_BlockType) { } }; diff --git a/src/Blocks/BlockPumpkin.h b/src/Blocks/BlockPumpkin.h index f4022735..d2e9d784 100644 --- a/src/Blocks/BlockPumpkin.h +++ b/src/Blocks/BlockPumpkin.h @@ -8,9 +8,10 @@ class cBlockPumpkinHandler : public cClearMetaOnDrop > { +typedef cClearMetaOnDrop > super; public: cBlockPumpkinHandler(BLOCKTYPE a_BlockType) - : cClearMetaOnDrop >(a_BlockType) + : super(a_BlockType) { }