View Single Post
check for the powerups in op4ctf...
Old
  (#1)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default check for the powerups in op4ctf... - 29-06-2004

here it is
Code:
void BotClient_Gearbox_StatusIcon(void *p, int bot_index)
{
   static int status;
   if (messagestate == 0)
      status = *(int *)p;
   else if (messagestate == 1)
   {
      if (FStrEq((char *)p, "item_ctfregen"))
         bots[bot_index].bHasRegen = (status != 0);
      else if (FStrEq((char *)p, "item_ctfljump"))
         bots[bot_index].bHasLongJump = (status != 0);
      else if (FStrEq((char *)p, "item_ctfphev"))
         bots[bot_index].bHasPhev = (status != 0);
      else if (FStrEq((char *)p, "item_ctfaccel"))
         bots[bot_index].bHasAccel = (status != 0);
      else if (FStrEq((char *)p, "item_ctfbpack"))
         bots[bot_index].bHasBpack = (status != 0);
   }
}
about what those variables mean:
Code:
   // powerups in OpFor CTF
   bool bHasRegen; // Ammo Regen Power-Up
   bool bHasLongJump; // Jump Pack Power-Up
   bool bHasPhev; // Shield Power-Up ("Portable HEV")
   bool bHasAccel; // Accelerator (Death) Power-Up
   bool bHasBpack; // Health Power-Up ("Backpack")

Last edited by Whistler; 29-06-2004 at 15:41..
  
Reply With Quote