From 360d8eade0332f2c1aa5c205ca772cd506c35b26 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Tue, 13 Jun 2017 20:35:30 +0100 Subject: FastRandom rewrite (#3754) --- src/Mobs/Witch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Mobs/Witch.cpp') diff --git a/src/Mobs/Witch.cpp b/src/Mobs/Witch.cpp index fa4074a54..3f56108ae 100644 --- a/src/Mobs/Witch.cpp +++ b/src/Mobs/Witch.cpp @@ -24,11 +24,11 @@ void cWitch::GetDrops(cItems & a_Drops, cEntity * a_Killer) { LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting); } - MTRand r1; - int DropTypeCount = (r1.randInt() % 3) + 1; + auto & r1 = GetRandomProvider(); + int DropTypeCount = r1.RandInt(1, 3); for (int i = 0; i < DropTypeCount; i++) { - int DropType = r1.randInt() % 7; + int DropType = r1.RandInt(6); switch (DropType) { case 0: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GLASS_BOTTLE); break; -- cgit v1.2.3