From: TimePath Date: Sun, 2 Aug 2015 09:11:01 +0000 (+1000) Subject: Merge branch 'master' into Mario/ctf_updates X-Git-Tag: xonotic-v0.8.1~29^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b55e45b97cbb933facb339fd58c9a42a053990a2;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into Mario/ctf_updates --- b55e45b97cbb933facb339fd58c9a42a053990a2 diff --cc qcsrc/client/hud.qc index 13103875e,e0dc1d91b..5e7cfb9e3 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@@ -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 diff --cc qcsrc/common/stats.qh index 9ff1bf4f6,fa5273763..fdb9da2a9 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@@ -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?