.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   hpb template 4 metamod & cleaned (http://forums.bots-united.com/showthread.php?t=3266)

dub 24-12-2004 06:49

hpb template 4 metamod & cleaned
 
download hpb template 4 converted to metamod & cleaned from http://dubb-coding.8bit.co.uk/botman_template_4_mm.7z :D .
"you might need to download 7-zip from http://www.7-zip.org to decompress the archive".

Pierre-Marie Baty 24-12-2004 09:35

Re: hpb template 4 metamod & cleaned
 
What do you mean by "cleaned" ? Were there bugs ?

Rifleman 24-12-2004 09:44

Re: hpb template 4 metamod & cleaned
 
wow , great job dude !

By the way , there are severe bug , you should reset the msec stuff every round ( I advised you to do so )

And this is an old bug of HPB_template

in bot_navigate.cpp the function BotChangePitch

pEdict->v.v_angle.x = current;

We have to add this line below the above line else the pitch angle we set wont have any use

pEdict->v.angles.x = pEdict->v.v_angle.x / 3;

dub 24-12-2004 11:34

Re: hpb template 4 metamod & cleaned
 
just take a look no extern vars every where now all defined in bot.h it`s so much more readable enjoy ;).

dub 24-12-2004 12:11

Re: hpb template 4 metamod & cleaned
 
added a couple of fixes thanks to rifleman & cleaned a little bit more.

dub 24-12-2004 12:14

Re: hpb template 4 metamod & cleaned
 
Quote:

Originally Posted by Rifleman
wow , great job dude !

By the way , there are severe bug , you should reset the msec stuff every round ( I advised you to do so )

done reset the msec at worldspawn when the gpGlobals->time starts from 0.0.

Pierre-Marie Baty 24-12-2004 21:07

Re: hpb template 4 metamod & cleaned
 
hmm, you'd better call this your own template, and not the "HPB template" anymore. This because botman did not want his bot to support Counter-Strike, and the msec problem you're talking about affects Counter-Strike (and thus round-based games) only.
Quote:

Originally Posted by Rifleman
And this is an old bug of HPB_template

in bot_navigate.cpp the function BotChangePitch

pEdict->v.v_angle.x = current;

We have to add this line below the above line else the pitch angle we set wont have any use

pEdict->v.angles.x = pEdict->v.v_angle.x / 3;

No, this is not needed because the bot's body angles are set already at the end of each BotThink, before the RunPlayerMove call. Doing it again here is redundant.

It's nice that you care about CS players, though, but I think you should fork from the official HPB template and call this another name instead.

Whistler 25-12-2004 07:19

Re: hpb template 4 metamod & cleaned
 
actually there's no need to reset the msec value every round at all, but if you defined the msec as global variable instead of the way the original HPB bot did you need to reset them to zero every map start.

Rifleman 25-12-2004 08:16

Re: hpb template 4 metamod & cleaned
 
Quote:

Originally Posted by Pierre-Marie Baty
No, this is not needed because the bot's body angles are set already at the end of each BotThink, before the RunPlayerMove call. Doing it again here is redundant.

Code:

  // make the body face the same way the bot is looking
  pEdict->v.angles.y = pEdict->v.v_angle.y;
 
  // save the previous speed (for checking if stuck)
  pBot->prev_speed = pBot->f_move_speed;
 
  BotFixIdealPitch (pEdict);
  BotFixIdealYaw (pEdict);
  BotFixBodyAngles (pEdict);
  BotFixViewAngles (pEdict);
 
  g_engfuncs.pfnRunPlayerMove (pEdict, pEdict->v.v_angle, pBot->f_move_speed,
                                                                0, 0, pEdict->v.button, 0, g_fMsecVal);
  return;
}

Pardon ?

Pierre-Marie Baty 25-12-2004 18:33

Re: hpb template 4 metamod & cleaned
 
well yes, you are right, it's my fault. I said this because it was really planned to put it there when botman allowed me to update his template but looks like I forgot to do it. And Whistler is right about the msecval too. The global msecval needs to be reset each time a new map starts. But since this is done in StartFrame already, there's no need to do it again in DispatchSpawn.


All times are GMT +2. The time now is 05:37.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.