diff options
author | madmaxoft <github@xoft.cz> | 2013-12-17 20:06:48 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-12-17 20:10:03 +0100 |
commit | a4f4ba534ee288c61a579986474296d3910f91e3 (patch) | |
tree | de9c27662756ac4fb7b9b74ef5f7df44a53b4e9a /src/Items/ItemBucket.h | |
parent | Forgot to change one Vector3d to Vector3i. (diff) | |
download | cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.tar cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.tar.gz cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.tar.bz2 cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.tar.lz cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.tar.xz cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.tar.zst cuberite-a4f4ba534ee288c61a579986474296d3910f91e3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemBucket.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 9d1fc276b..c9a632580 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -151,6 +151,7 @@ public: return true; } + bool GetBlockFromTrace(cWorld * a_World, cPlayer * a_Player, Vector3i & BlockPos) { class cCallbacks : @@ -158,7 +159,14 @@ public: { public: Vector3i m_Pos; - bool HitFluid; + bool m_HasHitFluid; + + + cCallbacks(void) : + m_HasHitFluid(false) + { + } + virtual bool OnNextBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, char a_EntryFace) override { if (a_BlockMeta != 0) // Even if it was a water block it would not be a source. @@ -167,8 +175,8 @@ public: } if (IsBlockWater(a_BlockType) || IsBlockLava(a_BlockType)) { - HitFluid = true; - m_Pos = Vector3i(a_BlockX, a_BlockY, a_BlockZ); + m_HasHitFluid = true; + m_Pos.Set(a_BlockX, a_BlockY, a_BlockZ); return true; } return false; @@ -181,7 +189,7 @@ public: Tracer.Trace(Start.x, Start.y, Start.z, End.x, End.y, End.z); - if (!Callbacks.HitFluid) + if (!Callbacks.m_HasHitFluid) { return false; } |