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
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?