]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/ctf_updates
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 2 Aug 2015 09:11:01 +0000 (19:11 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 2 Aug 2015 09:12:33 +0000 (19:12 +1000)
1  2 
qcsrc/client/hud.qc
qcsrc/common/notifications.qh
qcsrc/common/stats.qh

index 13103875ee4b7c82c9c8177494f1e6f90ba477d9,e0dc1d91b7c93babe7324ae3cdc585163643006e..5e7cfb9e3a2ceb38fc32487bf4e3e8cca89c65a6
@@@ -2877,31 -2866,23 +2871,31 @@@ void HUD_Mod_CTF(vector pos, vector myS
        vector flag_size;
        float f; // every function should have that
  
 -      int redflag, blueflag; // current status
 -      float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime; // time since the status changed
 -      int stat_items;
 +      int redflag, blueflag, yellowflag, pinkflag, neutralflag; // current status
 +      float redflag_statuschange_elapsedtime, blueflag_statuschange_elapsedtime, yellowflag_statuschange_elapsedtime, pinkflag_statuschange_elapsedtime, neutralflag_statuschange_elapsedtime; // time since the status changed
 +      bool ctf_oneflag; // one-flag CTF mode enabled/disabled
 +      int stat_items = getstati(STAT_CTF_FLAGSTATUS, 0, 24);
 +      float fs, fs2, fs3, size1, size2;
 +      vector e1, e2;
  
 -      stat_items = getstati(STAT_ITEMS, 0, 24);
 -      redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3;
 -      blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
 +      redflag = (stat_items/CTF_RED_FLAG_TAKEN) & 3;
 +      blueflag = (stat_items/CTF_BLUE_FLAG_TAKEN) & 3;
 +      yellowflag = (stat_items/CTF_YELLOW_FLAG_TAKEN) & 3;
 +      pinkflag = (stat_items/CTF_PINK_FLAG_TAKEN) & 3;
 +      neutralflag = (stat_items/CTF_NEUTRAL_FLAG_TAKEN) & 3;
 +      
 +      ctf_oneflag = (stat_items & CTF_FLAG_NEUTRAL);
  
-       mod_active = redflag || blueflag || yellowflag || pinkflag || neutralflag;
 -      if(redflag || blueflag)
 -              mod_active = 1;
 -      else
 -              mod_active = 0;
++      mod_active = (redflag || blueflag || yellowflag || pinkflag || neutralflag);
  
 -      if(autocvar__hud_configure)
 -      {
 +      if (autocvar__hud_configure) {
                redflag = 1;
                blueflag = 2;
 +              if (team_count >= 3)
 +                      yellowflag = 2;
 +              if (team_count >= 4)
 +                      pinkflag = 3;
 +              ctf_oneflag = neutralflag = 0; // disable neutral flag in hud editor?
        }
  
        // when status CHANGES, set old status into prevstatus and current status into status
Simple merge
index 9ff1bf4f6c0d07c6cb083080e2c7f754a9af4b11,fa52737631f93bf0599097b28ae9041b71142a27..fdb9da2a9266482d7dc394fa62ed3dfabdc8f946
@@@ -107,13 -107,12 +107,12 @@@ const int STAT_HEALING_ORB_ALPHA      
  const int STAT_PLASMA                 = 84;
  const int STAT_OK_AMMO_CHARGE         = 85;
  const int STAT_OK_AMMO_CHARGEPOOL     = 86;
- const int STAT_CTF_FLAGSTATUS         = 87;
- const int STAT_FROZEN                 = 88;
- const int STAT_REVIVE_PROGRESS        = 89;
- // 89 empty?
- // 90 empty?
- // 91 empty?
- // 92 empty?
+ const int STAT_FROZEN                 = 87;
+ const int STAT_REVIVE_PROGRESS        = 88;
+ const int STAT_WEAPONSINMAP           = 89;
+ const int STAT_WEAPONSINMAP2          = 90;
+ const int STAT_WEAPONSINMAP3          = 91;
 -// 92 empty?
++const int STAT_CTF_FLAGSTATUS         = 92;
  // 93 empty?
  // 94 empty?
  // 95 empty?