I got a bug in me to make at least a somewhat working bot program for a mod, so I downloaded RCBot 2. After I fixed the solution and everything I compiled and everything worked pretty well. However I noticed that the bots were moving really really fast and sometimes over shooting their way points and in some cases continually running around a loop point for a few seconds before moving on.
I tryed to lower their speed by modifying the runPlayMove function but found something weird.
I put a variable reporting mechanizm into the function to tell me how the bot is moving even though the function correctly sets the forward, side, etc, for some reason no mater what speed I set as max the bot would still move at the same speed in game.
So at a later point in time I changed my status code to this:
Code:
CBotCmd cmdLast = m_pPlayerInfo->GetLastUserCommand();
Msg( "Bot Data:\n" );
Msg( "-----------------------\n");
Msg( "Forward Speed: \"%f\"\n", cmdLast.forwardmove );
Msg( "Side Speed: \"%f\"\n", cmdLast.sidemove );
Msg( "Upward Speed: \"%f\"\n", cmdLast.upmove );
Msg( "Buttons Down: \"%i\"\n", cmdLast.buttons );
Msg( "Impulse: \"%i\"\n", cmdLast.impulse );
Msg( "Weapon Select: \"%i\"\n", cmdLast.weaponselect );
Msg( "\n\n\n\n" );
Notice the call to get last user command. What it does it go get the last bot command executed on the bot.
I got in game and was surprised to find that for some reason the values were sky rocketing at around 600 for forward at
all times and upwards of 1700 for sideways at times..
Code:
Bot Data:
-----------------------
Forward Speed: "576.200317"
Side Speed: "1748.183472"
Upward Speed: "0.000000"
Buttons Down: "0"
Impulse: "0"
Weapon Select: "0"
As compared to the data collected on the command sent to the bot:
Code:
Bot Data:
-----------------------
Forward Speed: "-38.637028"
Side Speed: "10.352784"
Upward Speed: "0.000000"
Buttons Down: "0"
Impulse: "0"
Weapon Select: "0"
Also my bot does weird things such as sprint whenever possible and is in general out of control.
I was wondering if this is a project of the source sdk or something I have to do to the code. My files are pretty much straight rcbot code, all except for my own bot plugin for a different mod other then css or hl2dm.
I figure that there might be a conflict between the default dumb bot actions and what rc bot wants to do. For example, if you just create a dumb bot it will wondering around randomly, my theory is that what my bots are doing is a combination of that and rc bot's movements causing the really fast and random moveing.
So my question is how would I disable the dumb bot movement if that is indeed the problem.
Also, Cheeseh, I cannot register for your forums, otherwise I would have posted there. I fill out the form but do not receive a confirmation email.
Thanks for any help.