summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Minecart.cpp6
-rw-r--r--src/Entities/Minecart.h8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index f75e23d8b..5a9217c9e 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -413,8 +413,10 @@ void cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cEmptyMinecart:
-cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z) :
- super(mpNone, a_X, a_Y, a_Z)
+cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height) :
+ super(mpNone, a_X, a_Y, a_Z),
+ m_Content(a_Content),
+ m_Height(a_Height)
{
}
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index b1b48be4e..87d375c68 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -77,10 +77,16 @@ class cEmptyMinecart :
public:
CLASS_PROTODEF(cEmptyMinecart);
- cEmptyMinecart(double a_X, double a_Y, double a_Z);
+ cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height);
+ cItem GetContent(void) const {return m_Content;}
+ int GetBlockHeight(void) const {return m_Height;}
// cEntity overrides:
virtual void OnRightClicked(cPlayer & a_Player) override;
+protected:
+
+ const cItem & m_Content;
+ int m_Height;
} ;