From: Mario Date: Sat, 23 Jan 2016 09:09:32 +0000 (+1000) Subject: Add default icons for teams 3 and 4 and neutral flag actions, and fix missing neutral... X-Git-Tag: xonotic-v0.8.2~1220 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=70ffa5e33212559e794db37c0f257c2ea94f8c8b;p=xonotic%2Fxonotic-data.pk3dir.git Add default icons for teams 3 and 4 and neutral flag actions, and fix missing neutral capture icon --- diff --git a/gfx/hud/default/notify_neutral_captured.tga b/gfx/hud/default/notify_neutral_captured.tga new file mode 100644 index 000000000..f067b0f6d Binary files /dev/null and b/gfx/hud/default/notify_neutral_captured.tga differ diff --git a/gfx/hud/default/notify_neutral_lost.tga b/gfx/hud/default/notify_neutral_lost.tga new file mode 100644 index 000000000..1ec6c58c5 Binary files /dev/null and b/gfx/hud/default/notify_neutral_lost.tga differ diff --git a/gfx/hud/default/notify_neutral_shielded.tga b/gfx/hud/default/notify_neutral_shielded.tga new file mode 100644 index 000000000..6ec133285 Binary files /dev/null and b/gfx/hud/default/notify_neutral_shielded.tga differ diff --git a/gfx/hud/default/notify_neutral_taken.tga b/gfx/hud/default/notify_neutral_taken.tga new file mode 100644 index 000000000..280ca3c34 Binary files /dev/null and b/gfx/hud/default/notify_neutral_taken.tga differ diff --git a/gfx/hud/default/notify_pink_captured.tga b/gfx/hud/default/notify_pink_captured.tga new file mode 100644 index 000000000..72e3a0a40 Binary files /dev/null and b/gfx/hud/default/notify_pink_captured.tga differ diff --git a/gfx/hud/default/notify_pink_lost.tga b/gfx/hud/default/notify_pink_lost.tga new file mode 100644 index 000000000..07cdd61e3 Binary files /dev/null and b/gfx/hud/default/notify_pink_lost.tga differ diff --git a/gfx/hud/default/notify_pink_returned.tga b/gfx/hud/default/notify_pink_returned.tga new file mode 100644 index 000000000..7d53b0730 Binary files /dev/null and b/gfx/hud/default/notify_pink_returned.tga differ diff --git a/gfx/hud/default/notify_pink_shielded.tga b/gfx/hud/default/notify_pink_shielded.tga new file mode 100644 index 000000000..f89d250f6 Binary files /dev/null and b/gfx/hud/default/notify_pink_shielded.tga differ diff --git a/gfx/hud/default/notify_pink_taken.tga b/gfx/hud/default/notify_pink_taken.tga new file mode 100644 index 000000000..e96b1f1f9 Binary files /dev/null and b/gfx/hud/default/notify_pink_taken.tga differ diff --git a/gfx/hud/default/notify_yellow_captured.tga b/gfx/hud/default/notify_yellow_captured.tga new file mode 100644 index 000000000..ba7d54038 Binary files /dev/null and b/gfx/hud/default/notify_yellow_captured.tga differ diff --git a/gfx/hud/default/notify_yellow_lost.tga b/gfx/hud/default/notify_yellow_lost.tga new file mode 100644 index 000000000..f41edef50 Binary files /dev/null and b/gfx/hud/default/notify_yellow_lost.tga differ diff --git a/gfx/hud/default/notify_yellow_returned.tga b/gfx/hud/default/notify_yellow_returned.tga new file mode 100644 index 000000000..718efbe5c Binary files /dev/null and b/gfx/hud/default/notify_yellow_returned.tga differ diff --git a/gfx/hud/default/notify_yellow_shielded.tga b/gfx/hud/default/notify_yellow_shielded.tga new file mode 100644 index 000000000..0de0c216a Binary files /dev/null and b/gfx/hud/default/notify_yellow_shielded.tga differ diff --git a/gfx/hud/default/notify_yellow_taken.tga b/gfx/hud/default/notify_yellow_taken.tga new file mode 100644 index 000000000..db208019d Binary files /dev/null and b/gfx/hud/default/notify_yellow_taken.tga differ diff --git a/gfx/hud/luma/notify_neutral_captured.tga b/gfx/hud/luma/notify_neutral_captured.tga new file mode 100644 index 000000000..78ac0898f Binary files /dev/null and b/gfx/hud/luma/notify_neutral_captured.tga differ diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qc b/qcsrc/common/mutators/mutator/buffs/buffs.qc index d810cd9f8..9b32642a4 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qc +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qc @@ -92,15 +92,6 @@ REGISTER_MUTATOR(buffs, cvar("g_buffs")) } } -entity buff_FirstFromFlags(int _buffs) -{ - if (flags) - { - FOREACH(Buffs, it.m_itemid & _buffs, LAMBDA(return it)); - } - return BUFF_Null; -} - bool buffs_BuffModel_Customize() {SELFPARAM(); entity player, myowner; diff --git a/qcsrc/common/mutators/mutator/buffs/module.inc b/qcsrc/common/mutators/mutator/buffs/module.inc index ab8747774..0d6e97cbb 100644 --- a/qcsrc/common/mutators/mutator/buffs/module.inc +++ b/qcsrc/common/mutators/mutator/buffs/module.inc @@ -11,6 +11,15 @@ string BUFF_NAME(int i) return sprintf("%s%s", rgb_to_hexcolor(b.m_color), b.m_prettyName); } +entity buff_FirstFromFlags(int _buffs) +{ + if (flags) + { + FOREACH(Buffs, it.m_itemid & _buffs, LAMBDA(return it)); + } + return BUFF_Null; +} + #ifdef CSQC REGISTER_MUTATOR(cl_buffs, true); MUTATOR_HOOKFUNCTION(cl_buffs, HUD_Powerups_add) diff --git a/qcsrc/common/notifications.inc b/qcsrc/common/notifications.inc index 978fb865a..a36dc23c2 100644 --- a/qcsrc/common/notifications.inc +++ b/qcsrc/common/notifications.inc @@ -219,7 +219,7 @@ MSG_INFO_NOTIF(2, INFO_CHAT_NOSPECTATORS, 0, 0, "", "", "", _("^F4NOTE: ^BGSpectator chat is not sent to players during the match"), "") MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 4, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag"), "") MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 4, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") - MSG_INFO_NOTIF(1, INFO_CTF_CAPTURE_NEUTRAL, 1, 0, "s1", "s1", "notify_%s_captured", _("^BG%s^BG captured the flag"), "") + MSG_INFO_NOTIF(1, INFO_CTF_CAPTURE_NEUTRAL, 1, 0, "s1", "s1", "notify_neutral_captured", _("^BG%s^BG captured the flag"), "") MULTITEAM_INFO(1, INFO_CTF_CAPTURE_TIME_, 4, 1, 1, "s1 f1p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds"), "") MULTITEAM_INFO(1, INFO_CTF_CAPTURE_UNBROKEN_, 4, 2, 2, "s1 f1p2dec s2 f2p2dec", "s1", "notify_%s_captured", _("^BG%s^BG captured the ^TC^TT^BG flag in ^F2%s^BG seconds, failing to break ^BG%s^BG's previous record of ^F1%s^BG seconds"), "") MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_ABORTRUN_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag was returned to base by its owner"), "") @@ -235,9 +235,9 @@ MULTITEAM_INFO(1, INFO_CTF_FLAGRETURN_TIMEOUT_, 4, 0, 0, "", "", "", _("^BGThe ^TC^TT^BG flag has returned to the base"), "") MSG_INFO_NOTIF(1, INFO_CTF_FLAGRETURN_TIMEOUT_NEUTRAL, 0, 0, "", "", "", _("^BGThe flag has returned to the base"), "") MULTITEAM_INFO(1, INFO_CTF_LOST_, 4, 1, 0, "s1", "s1", "notify_%s_lost", _("^BG%s^BG lost the ^TC^TT^BG flag"), "") - MSG_INFO_NOTIF(1, INFO_CTF_LOST_NEUTRAL, 1, 0, "s1", "s1", "notify_%s_lost", _("^BG%s^BG lost the flag"), "") + MSG_INFO_NOTIF(1, INFO_CTF_LOST_NEUTRAL, 1, 0, "s1", "s1", "notify_neutral_lost", _("^BG%s^BG lost the flag"), "") MULTITEAM_INFO(1, INFO_CTF_PICKUP_, 4, 1, 0, "s1", "s1", "notify_%s_taken", _("^BG%s^BG got the ^TC^TT^BG flag"), "") - MSG_INFO_NOTIF(1, INFO_CTF_PICKUP_NEUTRAL, 1, 0, "s1", "s1", "notify_%s_taken", _("^BG%s^BG got the flag"), "") + MSG_INFO_NOTIF(1, INFO_CTF_PICKUP_NEUTRAL, 1, 0, "s1", "s1", "notify_neutral_taken", _("^BG%s^BG got the flag"), "") MULTITEAM_INFO(1, INFO_CTF_RETURN_, 4, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag"), "") MULTITEAM_INFO(1, INFO_CTF_RETURN_MONSTER_, 4, 1, 0, "s1", "s1", "notify_%s_returned", _("^BG%s^BG returned the ^TC^TT^BG flag"), "") MSG_INFO_NOTIF(2, INFO_COINTOSS, 1, 0, "s1", "", "", _("^F2Throwing coin... Result: %s^F2!"), "") diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index f064e152b..00c9982c3 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -259,7 +259,7 @@ float Obituary_WeaponDeath( } .int buffs = _STAT(BUFFS); // TODO: remove - +entity buff_FirstFromFlags(int _buffs); void Obituary(entity attacker, entity inflictor, entity targ, int deathtype) { // Sanity check @@ -430,9 +430,9 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype) ); } - float f3 = 0; + int f3 = 0; if(deathtype == DEATH_BUFF.m_id) - f3 = attacker.buffs; + f3 = buff_FirstFromFlags(attacker.buffs).m_id; if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker)) Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, f3);