From 0dbba305b6b96f81fe5f9b457dfb4f63d4a420c9 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 18 May 2015 14:30:16 +0100 Subject: Fixes #2052 --- src/Items/ItemBucket.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Items/ItemBucket.h') diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 015720415..47429551a 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -96,7 +96,7 @@ public: ASSERT(!"Inventory bucket mismatch"); return true; } - if (a_Player->GetInventory().AddItem(cItem(NewItem), true, true) != 1) + if (a_Player->GetInventory().AddItem(cItem(NewItem)) != 1) { // The bucket didn't fit, toss it as a pickup: a_Player->TossPickup(cItem(NewItem)); @@ -137,7 +137,7 @@ public: return false; } cItem Item(E_ITEM_BUCKET, 1); - if (!a_Player->GetInventory().AddItem(Item, true, true)) + if (!a_Player->GetInventory().AddItem(Item)) { return false; } -- cgit v1.2.3 From e512b7bf8e78b0450a542107e0182ff52169e59a Mon Sep 17 00:00:00 2001 From: Blitz Rakete Date: Thu, 21 May 2015 19:03:51 +0200 Subject: Fixes #2059 --- src/Items/ItemBucket.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Items/ItemBucket.h') diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 015720415..45b4030a3 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -80,6 +80,13 @@ public: return false; } + // Check to see if destination block is too far away + // Reach Distance Multiplayer = 5 Blocks + if ((BlockPos.x - a_Player->GetPosX() > 5) || (BlockPos.z - a_Player->GetPosZ() > 5)) + { + return false; + } + // Remove water / lava block (unless plugins disagree) if (!a_Player->PlaceBlock(BlockPos.x, BlockPos.y, BlockPos.z, E_BLOCK_AIR, 0)) { @@ -126,6 +133,13 @@ public: { return false; } + + // Check to see if destination block is too far away + // Reach Distance Multiplayer = 5 Blocks + if ((BlockPos.x - a_Player->GetPosX() > 5) || (BlockPos.z - a_Player->GetPosZ() > 5)) + { + return false; + } if (a_Player->GetGameMode() != gmCreative) { -- cgit v1.2.3 From dae9e5792a4f030ae9e748548a16a89790fbd311 Mon Sep 17 00:00:00 2001 From: tycho Date: Sun, 24 May 2015 12:56:56 +0100 Subject: Made -Weverything an error. --- src/Items/ItemBucket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items/ItemBucket.h') diff --git a/src/Items/ItemBucket.h b/src/Items/ItemBucket.h index 015720415..1dbdfd7bc 100644 --- a/src/Items/ItemBucket.h +++ b/src/Items/ItemBucket.h @@ -236,7 +236,7 @@ public: m_EntryFace = static_cast(a_CBEntryFace); if (!cFluidSimulator::CanWashAway(a_CBBlockType) && !IsBlockLiquid(a_CBBlockType)) { - AddFaceDirection(a_CBBlockX, a_CBBlockY, a_CBBlockZ, (eBlockFace)a_CBEntryFace); // Was an unwashawayable block, can't overwrite it! + AddFaceDirection(a_CBBlockX, a_CBBlockY, a_CBBlockZ, static_cast(a_CBEntryFace)); // Was an unwashawayable block, can't overwrite it! } m_Pos.Set(a_CBBlockX, a_CBBlockY, a_CBBlockZ); // (Block could be washed away, replace it) return true; // Abort tracing -- cgit v1.2.3