.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Releases, Installers, Docs & Coding
Releases, Installers, Docs & Coding Where the official development happens

Reply
 
Thread Tools
pb2.6mm + CZ
Old
  (#1)
Aragon
Guest
 
Status:
Posts: n/a
Default pb2.6mm + CZ - 07-06-2004

Hi!
Ive got a funny problem! Im getting killed by my team(bots)mates
I am running podbot under CZ there are same waypointed maps I like to play.
But there is a small problem.. If I choose the spetsnatz-class for CT. My team thinks im an T and tries to kill me... And T thinks im one of them and dont bother me. Perfect..... But still.
The code for to add another class will I find that function in bot.cpp? Can someone plz give a hint?

Could it be on line 279 and 518 in bot.cpp
<code>
if ((bot_class < 1)|| (bot_class >5))
bot_class =5;
</code>
<code>
if((pBot->bot_class < 1) || (pBot->bot_class > 4))
pBot->bot_class = RANDOM_LONG (1,4);
</code>
Just guessing...

Last edited by Aragon; 07-06-2004 at 18:01..
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#2)
[+Duracell-]
Member
 
Status: Offline
Posts: 65
Join Date: Jan 2004
Default Re: pb2.6mm + CZ - 07-06-2004

Those apparantly just determine what skin the particular bot uses.

Look in bot_combat.cpp probably
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#3)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: pb2.6mm + CZ - 08-06-2004

no.. it's not those..
the problem is the team checking function in podbot checks for what skin they have..
and since it doesn't check for cz skins it cannot tell what team that player is..
[edit]
Code:
int UTIL_GetTeam (edict_t *pEntity)
{
   // return team number 0 through 3 based what MOD uses for team numbers

   char model_name[32];

   strncpy (model_name, (INFOKEY_VALUE (GET_INFOKEYBUFFER (pEntity), "model")), 32);

   if ((model_name[2] == 'b') // urBan
       || (model_name[2] == 'g') // gsG9, giGn
       || (model_name[2] == 's') // saS
       || (model_name[2] == 'p')) // viP
      return (TEAM_CS_COUNTER);

   return (TEAM_CS_TERRORIST); // teRror, leEt, guErilla, arCtic
}
[/edit]

Last edited by sPlOrYgOn; 08-06-2004 at 01:42..
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#4)
Aragon
Guest
 
Status:
Posts: n/a
Default Re: pb2.6mm + CZ - 08-06-2004

Funny The same moment you posted here I found it!
would it be enough if I added a line like this


|| (model_name[2] == 'e')) //Spetsnatz
return (TEAM_CS_COUNTER);
and then compile it?

THX!! It did work..
And my team of bots dont try to kill me no more..

Last edited by Aragon; 08-06-2004 at 02:10..
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#5)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: pb2.6mm + CZ - 08-06-2004

uhh Aragon..
that conflicts with leet...

[edit]
I suggest you use this instead:
Code:
int UTIL_GetTeam (edict_t *pEntity)
{
   // return team number 0 through 3 based what MOD uses for team numbers

   char model_name[32];

   strncpy (model_name, (INFOKEY_VALUE (GET_INFOKEYBUFFER (pEntity), "model")), 32);

   if ((model_name[2] == 'b') // urBan
       || (model_name[2] == 'g') // gsG9, giGn
       || (model_name[0] == 's') // Sas, Spetsnatz
       || (model_name[2] == 'p')) // viP
      return (TEAM_CS_COUNTER);

   return (TEAM_CS_TERRORIST); // teRror, leEt, guErilla, arCtic
}
[/edit]

Last edited by sPlOrYgOn; 08-06-2004 at 05:20..
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#6)
Aragon
Guest
 
Status:
Posts: n/a
Default Re: pb2.6mm + CZ - 08-06-2004

Ofcourse! We dont like/needs conflicts.. It was midnight yesterday so.. Thank You.
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#7)
>BKA< T Wrecks
Moderator [PBmm/Waypointing]& PODBot mm waypointer
 
>BKA< T Wrecks's Avatar
 
Status: Offline
Posts: 1,492
Join Date: Feb 2004
Location: C.C.A.A., Germania
Default Re: pb2.6mm + CZ - 08-06-2004

Well, if it's that easy, then I think it ought to be officially included! I mean, PB 2.6mm for CS and CZ, that's a good point to appeal to potential bot users, isn't it?



Roses are #FF0000, violets are #0000FF // all my base, are belong to you.

  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#8)
MusicMan
Member
 
Status: Offline
Posts: 236
Join Date: Feb 2004
Default Re: pb2.6mm + CZ - 08-06-2004

don't forget to add the Militia terrorist too Aragon
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#9)
dead bwoy
Member
 
dead bwoy's Avatar
 
Status: Offline
Posts: 512
Join Date: Feb 2004
Location: STL MO USA
Default Re: pb2.6mm + CZ - 08-06-2004

i think it would be smarter to detect the team rather than the skin. CZ is highly customizable so you can use different skins for every bot on the server. Maybe somehow hook into the player id that pops up when your x-heir points at a player, red for T, blue for CT.
  
Reply With Quote
Re: pb2.6mm + CZ
Old
  (#10)
Aragon
Guest
 
Status:
Posts: n/a
Default Re: pb2.6mm + CZ - 08-06-2004

Sure! you are making fun of me
Quote:
Originally Posted by MusicMan
don't forget to add the Militia terrorist too Aragon
if model=ct


if ((model_name[2] == 'b') // urBan
|| (model_name[2] == 'g')
// gsG9, giGn
|| (model_name[0] == 's')
// Sas, Spetsnatz
|| (model_name[2] == 'p'))
// viP
return
(TEAM_CS_COUNTER);

return (TEAM_CS_TERRORIST);
// teRror, leEt, guErilla, arCtic
}
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com