I never see bots with ARs?
#31
ac_bot.cpp, line 27 goes like
m_pMyEnt->nextprimary = 2 + rnd(5); // 2011jan18:ft: 2 == GUN_RIFLE, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIPER, GUN_ASSAULT - if CPISTOL is activated this needs a FIXME to rnd(6)

However, this used to be rnd(4) in 1.0 and it seemed to work fine, didn't it?

Then looking at the rnd function (ln 61, tools.cpp):
#define rnd(x) ((int)(randomMT()&0xFFFFFF)%(x))

Then looking at randomMT
uint randomMT(void)
{
    uint y;
    if(--left < 0) return(reloadMT());
    y  = *next++;
    y ^= (y >> 11);
    y ^= (y <<  7) & 0x9D2C5680U;
    y ^= (y << 15) & 0xEFC60000U;
    return(y ^ (y >> 18));
}

The problem is, tools.h was changed, specifically the part with random numbers. eihrul changed the function, but I can't tell what it does exactly I'm uber C++ noob. Then, thinking that rnd(6) would now be required for weapon numbers 2 3 4 5 6 7, I did that and compiled an SVN client with the change.

I found bots with ARs. [Image: 20110313121339acdouzebd.jpg]

I also found bots with no weapon. [Image: 20110313121354acdouzebd.jpg]

????
save us, eihrul!


Thanks given by:


Messages In This Thread
I never see bots with ARs? - by Duckett - 01 Mar 11, 04:41AM
RE: I never see bots with ARs? - by VenteX - 01 Mar 11, 04:45AM
RE: I never see bots with ARs? - by Duckett - 01 Mar 11, 04:49AM
RE: I never see bots with ARs? - by Orynge - 01 Mar 11, 05:53AM
RE: I never see bots with ARs? - by V-Man - 01 Mar 11, 05:57AM
RE: I never see bots with ARs? - by titiPT - 01 Mar 11, 08:33AM
RE: I never see bots with ARs? - by jAcKRoCk* - 01 Mar 11, 08:52AM
RE: I never see bots with ARs? - by Nightmare - 01 Mar 11, 02:03PM
RE: I never see bots with ARs? - by FleshyPod - 01 Mar 11, 06:07PM
RE: I never see bots with ARs? - by titiPT - 01 Mar 11, 07:59PM
RE: I never see bots with ARs? - by flowtron - 01 Mar 11, 08:57PM
RE: I never see bots with ARs? - by FleshyPod - 02 Mar 11, 07:25PM
RE: I never see bots with ARs? - by SplatZ - 12 Mar 11, 04:06PM
RE: I never see bots with ARs? - by V-Man - 01 Mar 11, 09:31PM
RE: I never see bots with ARs? - by VenteX - 01 Mar 11, 10:41PM
RE: I never see bots with ARs? - by Lantry - 02 Mar 11, 01:03AM
RE: I never see bots with ARs? - by VenteX - 03 Mar 11, 04:00AM
RE: I never see bots with ARs? - by Nightmare - 02 Mar 11, 12:07AM
RE: I never see bots with ARs? - by Bukz - 02 Mar 11, 08:24PM
RE: I never see bots with ARs? - by Nightmare - 03 Mar 11, 02:37AM
RE: I never see bots with ARs? - by Duckett - 03 Mar 11, 05:04AM
RE: I never see bots with ARs? - by Orynge - 04 Mar 11, 06:07AM
RE: I never see bots with ARs? - by Nightmare - 04 Mar 11, 01:43PM
RE: I never see bots with ARs? - by V-Man - 08 Mar 11, 09:15PM
RE: I never see bots with ARs? - by Lantry - 12 Mar 11, 06:25PM
RE: I never see bots with ARs? - by Duckett - 12 Mar 11, 09:26PM
RE: I never see bots with ARs? - by V-Man - 13 Mar 11, 08:28AM
RE: I never see bots with ARs? - by Bukz - 13 Mar 11, 08:30AM
RE: I never see bots with ARs? - by Gibstick - 13 Mar 11, 01:23PM
RE: I never see bots with ARs? - by Lantry - 15 Mar 11, 09:00PM
RE: I never see bots with ARs? - by Lantry - 13 Mar 11, 06:26PM
RE: I never see bots with ARs? - by Lantry - 13 Mar 11, 08:17PM
RE: I never see bots with ARs? - by Gibstick - 13 Mar 11, 08:19PM
RE: I never see bots with ARs? - by V-Man - 14 Mar 11, 03:14AM
RE: I never see bots with ARs? - by flowtron - 15 Mar 11, 12:34AM
RE: I never see bots with ARs? - by Gibstick - 15 Mar 11, 12:47AM
RE: I never see bots with ARs? - by Nightmare - 15 Mar 11, 01:57AM
RE: I never see bots with ARs? - by V-Man - 15 Mar 11, 03:59AM
RE: I never see bots with ARs? - by VenteX - 15 Mar 11, 09:29PM
RE: I never see bots with ARs? - by Nightmare - 16 Mar 11, 03:06AM
RE: I never see bots with ARs? - by flowtron - 16 Mar 11, 06:19AM
RE: I never see bots with ARs? - by VenteX - 20 Mar 11, 10:05PM
RE: I never see bots with ARs? - by flowtron - 21 Mar 11, 05:57AM