From a4f4ba534ee288c61a579986474296d3910f91e3 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 17 Dec 2013 20:06:48 +0100 Subject: Fixed naming and initialization. --- src/Items/ItemBucket.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/Items') 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; } -- cgit v1.2.3