View Single Post
Re: Buytable SCREWED.
Old
  (#21)
Josh_Borke
Member
 
Status: Offline
Posts: 152
Join Date: Jun 2004
Default Re: Buytable SCREWED. - 16-07-2004

would something like this work?

bot_buycode.cpp:270

Code:
 if (UTIL_GiveWeaponType (wapen_tabel[i].iId) == SHIELD)
 if (FUNC_BotHasWeapon (pBot, pBot->ipFavoPriWeapon) == true)
  continue;
also, a possible fix for buying a weapon with lower priority than the current weapon:
Code:
 if (pBot->iPrimaryWeapon > -1) {  // bot has a weapon
   if (wapen_tabel[pBot->iPrimaryWeapon].priority > wapen_tabel[i].priority)  
 // the weapon is at a higher priority than the one we can buy, don't do anything
 	 continue;
 // DOES NOT WORK!! need priority of current weapon
i'm not sure how to get the priority for the current weapon though

Last edited by Josh_Borke; 16-07-2004 at 16:08..
  
Reply With Quote