diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-28 23:13:27 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-28 23:13:27 +0200 |
commit | 1e910022291df03d5bc92b88d6a526e1bc0f095e (patch) | |
tree | a548d362feba75f69b9b7fcfebdc193d91e96553 /source/Entities/Minecart.cpp | |
parent | Zomb-ee and Skellingtons burning improvements (diff) | |
download | cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.gz cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.bz2 cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.lz cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.xz cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.tar.zst cuberite-1e910022291df03d5bc92b88d6a526e1bc0f095e.zip |
Diffstat (limited to 'source/Entities/Minecart.cpp')
-rw-r--r-- | source/Entities/Minecart.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/Entities/Minecart.cpp b/source/Entities/Minecart.cpp index 20811580a..c484d8763 100644 --- a/source/Entities/Minecart.cpp +++ b/source/Entities/Minecart.cpp @@ -18,7 +18,8 @@ cMinecart::cMinecart(ePayload a_Payload, double a_X, double a_Y, double a_Z) : super(etMinecart, a_X, a_Y, a_Z, 0.98, 0.7), m_Payload(a_Payload) { - m_Mass = 20.f; + SetMass(20.f); + SetMaxHealth(6); } @@ -40,21 +41,21 @@ bool cMinecart::Initialize(cWorld * a_World) void cMinecart::SpawnOn(cClientHandle & a_ClientHandle) { - char Type = 0; - switch (m_Payload) //Wiki.vg is outdated on this!! + char TypeType = 0; + switch (m_Payload) { - case mpNone: Type = 9; break; //? - case mpChest: Type = 10; break; - case mpFurnace: Type = 11; break; //? - case mpTNT: Type = 12; break; //? - case mpHopper: Type = 13; break; //? + case mpNone: TypeType = 0; break; + case mpChest: TypeType = 1; break; + case mpFurnace: TypeType = 2; break; + case mpTNT: TypeType = 3; break; + case mpHopper: TypeType = 5; break; default: { ASSERT(!"Unknown payload, cannot spawn on client"); return; } } - a_ClientHandle.SendSpawnVehicle(*this, Type); + a_ClientHandle.SendSpawnVehicle(*this, 10, TypeType); // 10 = Minecarts, TypeType = What type of Minecart } |