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:
#32
could the bot with no weapon be caused by it trying to give a bot weapon number 7, which doesn't exist yet?
Thanks given by:
#33
Gibstick, see what giving them weapon number 1 is. 2 3 4 5 6 7 you forgot 1.
Also make sure they are not trying to use the cpistol.
Thanks given by:
#34
iirc, 1 is the pistol. the normal one, not the cpistol (which is 7 i think)
Thanks given by:
#35
We'll have to test out the rnd function a bit more to understand. If 2 + rnd(5) doesn't give ARs but 2+ rnd(6) gives AR and combat pistol, there must be something funky going on.
Thanks given by:
#36
Weapon index numbers:
0 knife
1 pistol
2 carbine
3 shotgun
4 SMG
5 sniper
6 AR
7 (combat pistol)
8 nades
9 akimbo
Some of those may be bots trying to use cpistol/nades?
lol
But remember at the start of 1.1? People were remarking how funny it was to watch bots rifle-sprint themselves across the map like little grasshoppers -- using the AR.
Thanks given by:
#37
Gibstick: just for my sanity's sake: you are testing this in SVN, yes? Because I distinctly remember doing some work on weapon-selection end of last year.
One good testing variant we could establish would be a force-bots-to-use-weapon-X switch.
Thanks given by:
#38
Flow, that may of been for the carbine?
*sigh*: may've - may have. Not "may of", that's only "5th of May":"Cinco de Mayo" ;-P
:( I have been really tired though out the week :'( Please forgive me?
Thanks given by:
#39
I am testing this in SVN.
Thanks given by:
#40
Combat Pistol should come to fruition so the bot isn't holding an invisigun :(
Thanks given by:
#41
Odd that it allowed the bot to "select" combat pistol (if we're sure that's what it is) at all.
Thanks given by:
#42
(13 Mar 11, 01:23PM)Gibstick Wrote: 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.

Wouldn't you want rnd(5) for 2 3 4 5 6? because including 7 would make it create a bot with combatpistol (if i understand this correctly, i haven't tested anything and i know very little about how it works)

EDIT: doh, i just looked at ac_bot.cpp and this is what it is currently at, with a note to change it to rnd(6) if cpistol is added
Thanks given by:
#43
How about we finish balancing (EDIT: letting collect dust) that dang Combat Pistol and enable it! >_<

* VenteX wants to play with the friggin' Combat Pistol
Thanks given by:
#44
AFAIK they aren't "balancing" it. They are letting it collect dust.
Thanks given by:
#45
(15 Mar 11, 09:29PM)VenteX Wrote: How about we finish balancing (EDIT: letting collect dust) that dang Combat Pistol and enable it! >_<

* VenteX wants to play with the friggin' Combat Pistol

I also wish this :(
Thanks given by:
#46
wrong thread - quick answer, we thought balance first, new weapon later.
Thanks given by:
#47
Not what happened with the carbine xP
Thanks given by:
#48
VenteX: because it's usage was clear, it's not with the CombatPistol - as I've mentioned before - please let's stick to the topic though.
Thanks given by: