.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   check for the powerups in op4ctf... (http://forums.bots-united.com/showthread.php?t=2142)

Whistler 29-06-2004 14:47

check for the powerups in op4ctf...
 
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")


Pierre-Marie Baty 29-06-2004 15:21

Re: check for the powerups in op4ctf...
 
...and for everyone's information, it's exactly the same code in Counter-Strike with the bomb/buy zone/defuse kit icons :)

status = 0: not displayed
status = 1: displayed
status = 2: displayed and blinking


All times are GMT +2. The time now is 00:51.

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