summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-01-12 18:04:41 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-01-12 18:04:41 +0100
commitf11427e8cd5506204958eec68a8ac2a9152df108 (patch)
treecce60b10962d911daf4b70e96c21701b975b1eb8 /src/Entities
parentEmptyMinecarts should be able to get a block inside of them. (diff)
downloadcuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar
cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.gz
cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.bz2
cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.lz
cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.xz
cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.tar.zst
cuberite-f11427e8cd5506204958eec68a8ac2a9152df108.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Minecart.cpp7
-rw-r--r--src/Entities/Minecart.h6
2 files changed, 7 insertions, 6 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index 5a9217c9e..19642efba 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -45,6 +45,7 @@ void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
}
}
a_ClientHandle.SendSpawnVehicle(*this, 10, SubType); // 10 = Minecarts, SubType = What type of Minecart
+ a_ClientHandle.SendEntityMetadata(*this);
}
@@ -411,9 +412,9 @@ void cMinecart::DoTakeDamage(TakeDamageInfo & TDI)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// cEmptyMinecart:
+// cRideableMinecart:
-cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height) :
+cRideableMinecart::cRideableMinecart(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)
@@ -424,7 +425,7 @@ cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem &
-void cEmptyMinecart::OnRightClicked(cPlayer & a_Player)
+void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
{
if (m_Attachee != NULL)
{
diff --git a/src/Entities/Minecart.h b/src/Entities/Minecart.h
index 87d375c68..a646132ab 100644
--- a/src/Entities/Minecart.h
+++ b/src/Entities/Minecart.h
@@ -69,15 +69,15 @@ protected:
-class cEmptyMinecart :
+class cRideableMinecart :
public cMinecart
{
typedef cMinecart super;
public:
- CLASS_PROTODEF(cEmptyMinecart);
+ CLASS_PROTODEF(cRideableMinecart);
- cEmptyMinecart(double a_X, double a_Y, double a_Z, const cItem & a_Content, int a_Height);
+ cRideableMinecart(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;}