From 95548cb1caad95933e2b36df9a13af070b733b04 Mon Sep 17 00:00:00 2001 From: gepard1984 Date: Tue, 17 Jan 2012 18:06:34 +0000 Subject: Enabled Mersenne Twister MT19937 as random number generator instead of standard `rand()` function (follow-up to r14865, r14870). - It fixes issues caused by RAND_MAX being only 32k in Windows system (bugreport:1927, bugreport:86). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/party.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/map/party.c') diff --git a/src/map/party.c b/src/map/party.c index 377d467cb..f850efb7c 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -6,6 +6,7 @@ #include "../common/socket.h" // last_tick #include "../common/nullpo.h" #include "../common/malloc.h" +#include "../common/random.h" #include "../common/showmsg.h" #include "../common/utils.h" #include "../common/strlib.h" @@ -1054,7 +1055,7 @@ int party_share_loot(struct party_data* p, struct map_session_data* sd, struct i count++; } while (count > 0) { //Pick a random member. - i = rand()%count; + i = rnd()%count; if (pc_additem(psd[i],item_data,item_data->amount,LOG_TYPE_PICKDROP_PLAYER)) { //Discard this receiver. psd[i] = psd[count-1]; -- cgit v1.2.3-60-g2f50