.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Reports (http://forums.bots-united.com/forumdisplay.php?f=49)
-   -   bot spray disapears in #2.1 (http://forums.bots-united.com/showthread.php?t=1838)

g4s 02-06-2004 04:26

bot spray disapears in #2.1
 
I don't know if you guys have noticed this - bot spray doesn't show.
I started a game with 31 bots, played about 15 minutes, I kept restarting to expect a bot spray. but I can only HEAR the spray sound, but no logo.
Then I switched back to #2.0, and spray showed up.
I compared the source, found something of botspray has been changed, but haven't found why. o_O

sPlOrYgOn 02-06-2004 04:44

Re: bot spray disapears in #2.1
 
hmmm...
You or someone else that had access to your source must have edited it...
I never touched the spray code..
and I've just check right now and my spray code for release2.0, 2.1, and my current code still has the same spray code as R1.0

g4s 02-06-2004 05:36

Re: bot spray disapears in #2.1
 
you replaced #2 download with #2.1 right?
ok, here are the files I have, dll.cpp

Release 2
Code:

  // Load & Initialise BotLogos from BotLogos.cfg
  fpText = fopen ("cstrike/addons/podbot/botlogos.cfg", "r");
  if (fpText == NULL)
  {
          strcpy (szError,"No BotLogos.cfg ! Using Defaults...\n");
          ALERT (at_error, szError);
          fp = fopen ("PODERROR.txt", "a"); fprintf (fp, szError); fclose (fp);
  }
  else
  {
          file_index = 0;
          szBuffer[file_index] = 0; // null out Buffer
          g_iNumLogos = 0;
          while ((fpText != NULL) && (!feof (fpText)))
          {
                FillBufferFromFile(fpText,(char *)&szBuffer, file_index);
                file_index = 0; // reset for next input line
                if ((szBuffer[0] == '#') || (szBuffer[0] == 0) ||
                        (szBuffer[0] == '\r') || (szBuffer[0] == '\n'))
                {
                        continue; // ignore comments or blank lines
                }
                strcpy (&szSprayNames[g_iNumLogos][0],&szBuffer[0]);
                g_iNumLogos++;
          }
          g_iNumLogos--;
          if (fpText != NULL)
          {
                fclose (fpText);
                fpText = NULL;
          }
  }
  // End BotLogos

Release 2.1
Code:

  // Load & Initialise BotLogos from BotLogos.cfg
  fp = fopen ("cstrike/addons/podbot/botlogos.cfg", "r");
  if (fp == NULL)
          UTIL_ServerPrint ("No BotLogos.cfg ! Using Defaults...\n");
  else
  {
          g_iNumLogos = 0;
          while (fgets (line_buffer, 256, fp) != NULL)
          {
                if ((line_buffer[0] == '#') || (line_buffer[0] == 0) || (line_buffer[0] == '\r') || (line_buffer[0] == '\n'))
                        continue; // ignore comments or blank lines
                strcpy (szSprayNames[g_iNumLogos], GetField (line_buffer, 0));
                g_iNumLogos++;
          }
          fclose (fp);
  }
  // End BotLogos

maybe I just messed up those with different versions, I'll double check that.

btw, is your botspray working? can you see those logos or just sound?

sPlOrYgOn 02-06-2004 05:40

Re: bot spray disapears in #2.1
 
it's been like R2.1 since podbot_sdk...
your 2.0 source is wrong...

and yes I do see logos..

g4s 02-06-2004 06:04

Re: bot spray disapears in #2.1
 
o_O what am I doing wrong????:(
this time I just download the lastest 2.1, replace the whole folder, then start game. but I can only hear the spray sound, not even one logo. :'(

sPlOrYgOn 02-06-2004 06:07

Re: bot spray disapears in #2.1
 
lag? or you didn't give a high enough number to mp_decals?

[edit]
or maybe when the bot was going to spray..
the traceline it fired didn't hit anything but it still sends the sound...
[/edit]

[edit2]
oh crap you are right..
I was playing on a bot/human server and thought the bots sprayed it..
[/edit2]

g4s 02-06-2004 08:16

Re: bot spray disapears in #2.1
 
Quote:

lag?
lan
Quote:

you didn't give a high enough number to mp_decals?
decalfrequency 30 (mp_decals is for blood and bullet holes I think)
Quote:

the traceline it fired didn't hit anything
They look down like before and spray. If this is the case, I couldv seen at least once or twice in a while. but not even one.

I don't know why this happens, The botsprays work fine if I switch back to R1 or 2.5. I'll take a careful look on those codes again.

Thanks for the replies.

sPlOrYgOn 02-06-2004 08:20

Re: bot spray disapears in #2.1
 
yea sorry my fault.. look at above edit..
and i think i see the error...

g4s 02-06-2004 08:38

Re: bot spray disapears in #2.1
 
k, this is really weird...
the spray works on R1 but not R2
I manually searched 'spray' and 'logo' in both r1 and r2 sources, all those related terms are EXACTLY the same. how can this happen?

sPlOrYgOn 02-06-2004 08:52

Re: bot spray disapears in #2.1
 
umm :D
it was during that stupid NUM_FOR_EDICT bug hunt :D
I put a FNullEnt checking everything single entity...
including the entity that the spray points at...
and if it's null it'll return and not spray..
which it usually is...
in util.cpp
find UTIL_DecalTrace
and find a if (FNullEnt (pHit)) return;
and delete it...
then they should spray once again!


All times are GMT +2. The time now is 11:54.

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