summaryrefslogtreecommitdiffstats
path: root/src/Entities/Minecart.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-21 15:18:17 +0100
committerMattes D <github@xoft.cz>2015-03-21 15:18:17 +0100
commitcc069ccb2a03db87e9de45ee84df9e2bd0b50545 (patch)
treee25723d95c7724505f7756a0dbbb0d48f68c7ddf /src/Entities/Minecart.cpp
parentUnified cByteBuffer types. (diff)
downloadcuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar
cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.gz
cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.bz2
cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.lz
cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.xz
cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.tar.zst
cuberite-cc069ccb2a03db87e9de45ee84df9e2bd0b50545.zip
Diffstat (limited to '')
-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 a32926838..ee10cf6b3 100644
--- a/src/Entities/Minecart.cpp
+++ b/src/Entities/Minecart.cpp
@@ -24,7 +24,7 @@ class cMinecartCollisionCallback :
public cEntityCallback
{
public:
- cMinecartCollisionCallback(Vector3d a_Pos, double a_Height, double a_Width, int a_UniqueID, int a_AttacheeUniqueID) :
+ cMinecartCollisionCallback(Vector3d a_Pos, double a_Height, double a_Width, UInt32 a_UniqueID, UInt32 a_AttacheeUniqueID) :
m_DoesInteserct(false),
m_CollidedEntityPos(0, 0, 0),
m_Pos(a_Pos),
@@ -77,8 +77,8 @@ protected:
Vector3d m_Pos;
double m_Height, m_Width;
- int m_UniqueID;
- int m_AttacheeUniqueID;
+ UInt32 m_UniqueID;
+ UInt32 m_AttacheeUniqueID;
};
@@ -824,7 +824,10 @@ bool cMinecart::TestBlockCollision(NIBBLETYPE a_RailMeta)
bool cMinecart::TestEntityCollision(NIBBLETYPE a_RailMeta)
{
- cMinecartCollisionCallback MinecartCollisionCallback(GetPosition(), GetHeight(), GetWidth(), GetUniqueID(), ((m_Attachee == nullptr) ? -1 : m_Attachee->GetUniqueID()));
+ cMinecartCollisionCallback MinecartCollisionCallback(
+ GetPosition(), GetHeight(), GetWidth(), GetUniqueID(),
+ ((m_Attachee == nullptr) ? cEntity::INVALID_ID : m_Attachee->GetUniqueID())
+ );
int ChunkX, ChunkZ;
cChunkDef::BlockToChunk(POSX_TOINT, POSZ_TOINT, ChunkX, ChunkZ);
m_World->ForEachEntityInChunk(ChunkX, ChunkZ, MinecartCollisionCallback);