Fixed random drops not occurring at all
git-svn-id: http://mc-server.googlecode.com/svn/trunk@579 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
6d36a82e19
commit
308f6b846f
@ -12,11 +12,11 @@
|
|||||||
|
|
||||||
static void AddRandomDrop(cItems & a_Drops, MTRand & r1, int a_OneInNChance, ENUM_ITEM_ID a_ItemID)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
a_Drops.push_back(cItem(a_ItemID));
|
a_Drops.push_back(cItem(a_ItemID, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user