.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Bug Reports (http://forums.bots-united.com/forumdisplay.php?f=49)
-   -   Scoped Rifles...bots do not zoom or shoot them at all? (http://forums.bots-united.com/showthread.php?t=2173)

Burnt Powder 02-07-2004 08:02

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
Quote:

Originally Posted by sPlOrYgOn
I see...
this code would make it so that if you set maxweaponpick up to lets just say 4 it would allow the bot to pick up 5...
1 more than what was specified..

OK I see.....so when I set it to 0, it is really allowing them to pick up 1 weapon and is pooping my attempted work-around for Sniper-Rifles.

Anyhow, even if I have it at 0 and they can pick up 1, why are they picking up scoped guns when I have them at the end of my priority list?
Quote:

Originally Posted by sPlOrYgOn
fixed now....

What is?

sPlOrYgOn 02-07-2004 08:09

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
it doesn't seem to use the priority list for picking up weapons..
only for buying..
this needs changing..

Burnt Powder 02-07-2004 08:14

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
Quote:

Originally Posted by sPlOrYgOn
it doesn't seem to use the priority list for picking up weapons..
only for buying..
this needs changing..

OK thanks for hearing me out.

sPlOrYgOn 02-07-2004 08:18

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
sorry it does use their preferences...
but it uses them backwards...
so right now the sniper rifles on your server are the most valueable to pick up :D

Burnt Powder 02-07-2004 08:21

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
So for buying, is used them in the order I have them listed but for picking them up, it uses them in reverse order........that is just wrong.

sPlOrYgOn 02-07-2004 08:23

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
Code:

int BotRateGroundWeapon (bot_t *pBot, edict_t *pent)
{
  // Compares Weapons on the Ground to the one the Bot is using

  int i;
  int iHasWeapon = GetBestWeaponCarried (pBot);
  int *ptrWeaponTab = ptrWeaponPrefs[pBot->bot_personality];
  bot_weapon_select_t *pWeaponTab = &cs_weapon_select[0];

  int iGroundIndex = 0;
  char szModelName[40];

  strncpy (szModelName, STRING (pent->v.model), 40);

  for (i = 0; i < NUM_WEAPONS; i++)
  {
      if (FStrEq (pWeaponTab[*ptrWeaponTab].model_name, szModelName))
      {
        iGroundIndex = i;
        break;
      }

      ptrWeaponTab++;
  }

  // Don't care for pistols
  // TODO Include Pistols as well...
  if (iGroundIndex < 7)
      iGroundIndex = 0;

  return (iGroundIndex - iHasWeapon);
}

should probably be
Code:

int BotRateGroundWeapon (bot_t *pBot, edict_t *pent)
{
  // Compares Weapons on the Ground to the one the Bot is using

  int i;
  int iHasWeapon = GetBestWeaponCarried (pBot);
  int *ptrWeaponTab = ptrWeaponPrefs[pBot->bot_personality];
  bot_weapon_select_t *pWeaponTab = &cs_weapon_select[0];

  int iGroundIndex = 0;
  char szModelName[40];

  ptrWeaponTab += NUM_WEAPONS;
  strncpy (szModelName, STRING (pent->v.model), 40);

  for (i = 0; i < NUM_WEAPONS; i++)
  {
      if (FStrEq (pWeaponTab[*ptrWeaponTab].model_name, szModelName))
      {
        iGroundIndex = i;
        break;
      }

      ptrWeaponTab--;
  }

  // Don't care for pistols
  // TODO Include Pistols as well...
  if (iGroundIndex < 7)
      iGroundIndex = 0;

  return (iGroundIndex - iHasWeapon);
}

that should fix it :D


[edit]
heres the dll with the above fix
http://www.mapzap.org/files/podbot/podbotBETA.zip
[/edit]

Burnt Powder 02-07-2004 08:29

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
***EDIT***

Thanks!

Burnt Powder 02-07-2004 08:46

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
Do not know what it is but I am getting memory errors with this new dll 8 seconds after the initial CS Server startup or if by some stroke of luck it does not bomb, it will bomb on the first map change. This was not an issue with the 06/29/04 dll.

If I comment out the dll so it does not load, the server works fine.

Can you link me to the 06/29/04 version again or sort this out as I have overwritten the 06/29/04 with the version you posted above?

TIA

Burnt Powder 02-07-2004 09:35

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
***Bump***

Delete this when you read my above post please.

Burnt Powder 02-07-2004 20:58

Re: Scoped Rifles...bots do not zoom or shoot them at all?
 
Does anyone have a link to the to the 06/29/04 DLL that I can use for the time being till this is sorted out?


All times are GMT +2. The time now is 08:17.

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