summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-17 11:27:56 +0100
committerMattes D <github@xoft.cz>2014-01-17 11:27:56 +0100
commit79c1f6f43844a85abac53f4c61bff398b88b669d (patch)
treef938528aed92ffdbea0c5d15f84f738c65c9d8d4 /src/Entities/Minecart.cpp
parentFixed SIGABRT_COMPAT on other architectures. (diff)
parentChanged GetContent function. (diff)
downloadcuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.tar
cuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.tar.gz
cuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.tar.bz2
cuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.tar.lz
cuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.tar.xz
cuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.tar.zst
cuberite-79c1f6f43844a85abac53f4c61bff398b88b669d.zip
Diffstat (limited to 'src/Entities/Minecart.cpp')
-rw-r--r--src/Entities/Minecart.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index 2c1287d40..d0d384481 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -54,6 +54,7 @@ void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
}
}
a_ClientHandle.SendSpawnVehicle(*this, 10, SubType); // 10 = Minecarts, SubType = What type of Minecart
+ a_ClientHandle.SendEntityMetadata(*this);
}
@@ -672,10 +673,12 @@ void cMinecart::Destroyed()
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// cEmptyMinecart:
+// cRideableMinecart:
-cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z) :
- super(mpNone, a_X, a_Y, a_Z)
+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)
{
}
@@ -683,7 +686,7 @@ cEmptyMinecart::cEmptyMinecart(double a_X, double a_Y, double a_Z) :
-void cEmptyMinecart::OnRightClicked(cPlayer & a_Player)
+void cRideableMinecart::OnRightClicked(cPlayer & a_Player)
{
if (m_Attachee != NULL)
{