.:: 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 ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Re: new CS update screws up intercepting chat messages!?
Old
  (#21)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: new CS update screws up intercepting chat messages!? - 21-06-2004

Yes it should be revised, but thats merely for the looks, not for the game to work properly.


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#22)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: new CS update screws up intercepting chat messages!? - 21-06-2004

I don't think so. I use the same TextMsg message that botman's UTIL_SayText uses to display a lot of debugging stuff for my bot, and so far all my messages display fine.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#23)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: new CS update screws up intercepting chat messages!? - 21-06-2004

sure they display fine... but have you taken a look at the new format in CS 1.6? If you use that format the 'looks' are different.. thats what i said


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#24)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: new CS update screws up intercepting chat messages!? - 21-06-2004

Code:
void ClientCommand( edict_t *pEntity )
{
   const char *pcmd = CMD_ARGV(0);
   const char *arg1 = CMD_ARGV(1);

   static int iFillServerTeam = 5;

   if (isFakeClientCommand == 0)
   {
      if (FStrEq(pcmd, "say") || FStrEq(pcmd, "say_team"))
      {
         bool bAlive = IsAlive(pEntity);
         int iTeam = -1;
         if (FStrEq(pcmd, "say_team"))
            iTeam = UTIL_GetTeam(pEntity);

         for (int i = 0; i < gpGlobals->maxClients; i++)
         {
            if (!ThreatTab[i].IsUsed ||
               (iTeam != -1 && iTeam != ThreatTab[i].iTeam) ||
               bAlive != IsAlive(ThreatTab[i].pEdict))
               continue;
            CBaseBot *pBot = g_rgpBots[i];
            if (pBot)
            {
               pBot->m_SaytextBuffer.iEntityIndex = ENTINDEX(pEntity);
               strcpy(pBot->m_SaytextBuffer.szSayText, CMD_ARGS());
               pBot->m_SaytextBuffer.fTimeNextChat = gpGlobals->time + pBot->m_SaytextBuffer.fChatDelay;
            }
         }
      }
I prefer this one since it's much simpler, and the POD-Bot already has code to deal with what bots said.
The only problem is it won't catch other bots' messages if other bots use botman's chat code.
  
Reply With Quote
Re: new CS update screws up intercepting chat messages!?
Old
  (#25)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: new CS update screws up intercepting chat messages!? - 21-06-2004

just remove the if (isFakeClientCommand) check then...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
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