summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-19 13:31:35 +0200
committerMattes D <github@xoft.cz>2014-07-19 13:31:35 +0200
commitc2aa7d78bfe45e6ca363cb831d5cd605bf1779fc (patch)
treea8de103269fb7ef98a726e51bf8fcdfd17702ab9 /src/Entities/Minecart.cpp
parentMerge pull request #1224 from mc-server/fixes-potions (diff)
parentWorld.cpp: fixed not all enum fields being used in m_Dimension switch (diff)
downloadcuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar
cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.gz
cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.bz2
cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.lz
cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.xz
cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.tar.zst
cuberite-c2aa7d78bfe45e6ca363cb831d5cd605bf1779fc.zip
Diffstat (limited to 'src/Entities/Minecart.cpp')
-rw-r--r--src/Entities/Minecart.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/Entities/Minecart.cpp b/src/Entities/Minecart.cpp
index 03850c8a7..d4eadc5d5 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -103,21 +103,7 @@ cMinecart::cMinecart(ePayload a_Payload, double a_X, double a_Y, double a_Z) :
void cMinecart::SpawnOn(cClientHandle & a_ClientHandle)
{
- char SubType = 0;
- switch (m_Payload)
- {
- case mpNone: SubType = 0; break;
- case mpChest: SubType = 1; break;
- case mpFurnace: SubType = 2; break;
- case mpTNT: SubType = 3; break;
- case mpHopper: SubType = 5; break;
- default:
- {
- ASSERT(!"Unknown payload, cannot spawn on client");
- return;
- }
- }
- a_ClientHandle.SendSpawnVehicle(*this, 10, SubType); // 10 = Minecarts, SubType = What type of Minecart
+ a_ClientHandle.SendSpawnVehicle(*this, 10, (char)m_Payload); // 10 = Minecarts
a_ClientHandle.SendEntityMetadata(*this);
}