diff options
author | Mattes D <github@xoft.cz> | 2015-03-24 13:09:41 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-03-24 13:09:41 +0100 |
commit | e5a7a730ed4f26eae896c56391bf3d2b5fecb852 (patch) | |
tree | 0209c1567f60af60999f3aeeb513a72f9eab2743 /src/Entities/Minecart.cpp | |
parent | Merge pull request #1775 from tommysanterre/terrainheightfix (diff) | |
parent | Added VarInt64, normalized cPacketizer datatype names. (diff) | |
download | cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.gz cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.bz2 cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.lz cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.xz cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.tar.zst cuberite-e5a7a730ed4f26eae896c56391bf3d2b5fecb852.zip |
Diffstat (limited to 'src/Entities/Minecart.cpp')
-rw-r--r-- | src/Entities/Minecart.cpp | 11 |
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); |