From 308f6b846fb4dd8ecb0b2c36ac4ab96f4f23b589 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 8 Jun 2012 14:52:17 +0000 Subject: [PATCH] Fixed random drops not occurring at all git-svn-id: http://mc-server.googlecode.com/svn/trunk@579 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cBlockToPickup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/cBlockToPickup.cpp b/source/cBlockToPickup.cpp index 14a349bb2..d758ea255 100644 --- a/source/cBlockToPickup.cpp +++ b/source/cBlockToPickup.cpp @@ -12,11 +12,11 @@ static void AddRandomDrop(cItems & a_Drops, MTRand & r1, int a_OneInNChance, ENUM_ITEM_ID a_ItemID) { - if (r1.randInt(a_OneInNChance - 1) != 0) + if ((r1.randInt(16 * a_OneInNChance - 1) / 16) != 0) { return; } - a_Drops.push_back(cItem(a_ItemID)); + a_Drops.push_back(cItem(a_ItemID, 1)); }