]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add default icons for teams 3 and 4 and neutral flag actions, and fix missing neutral...
authorMario <mario@smbclan.net>
Sat, 23 Jan 2016 09:09:32 +0000 (19:09 +1000)
committerMario <mario@smbclan.net>
Sat, 23 Jan 2016 09:09:32 +0000 (19:09 +1000)
19 files changed:
gfx/hud/default/notify_neutral_captured.tga [new file with mode: 0644]
gfx/hud/default/notify_neutral_lost.tga [new file with mode: 0644]
gfx/hud/default/notify_neutral_shielded.tga [new file with mode: 0644]
gfx/hud/default/notify_neutral_taken.tga [new file with mode: 0644]
gfx/hud/default/notify_pink_captured.tga [new file with mode: 0644]
gfx/hud/default/notify_pink_lost.tga [new file with mode: 0644]
gfx/hud/default/notify_pink_returned.tga [new file with mode: 0644]
gfx/hud/default/notify_pink_shielded.tga [new file with mode: 0644]
gfx/hud/default/notify_pink_taken.tga [new file with mode: 0644]
gfx/hud/default/notify_yellow_captured.tga [new file with mode: 0644]
gfx/hud/default/notify_yellow_lost.tga [new file with mode: 0644]
gfx/hud/default/notify_yellow_returned.tga [new file with mode: 0644]
gfx/hud/default/notify_yellow_shielded.tga [new file with mode: 0644]
gfx/hud/default/notify_yellow_taken.tga [new file with mode: 0644]
gfx/hud/luma/notify_neutral_captured.tga [new file with mode: 0644]
qcsrc/common/mutators/mutator/buffs/buffs.qc
qcsrc/common/mutators/mutator/buffs/module.inc
qcsrc/common/notifications.inc
qcsrc/server/g_damage.qc

diff --git a/gfx/hud/default/notify_neutral_captured.tga b/gfx/hud/default/notify_neutral_captured.tga
new file mode 100644 (file)
index 0000000..f067b0f
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 (file)
index 0000000..1ec6c58
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 (file)
index 0000000..6ec1332
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 (file)
index 0000000..280ca3c
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 (file)
index 0000000..72e3a0a
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 (file)
index 0000000..07cdd61
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 (file)
index 0000000..7d53b07
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 (file)
index 0000000..f89d250
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 (file)
index 0000000..e96b1f1
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 (file)
index 0000000..ba7d540
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 (file)
index 0000000..f41edef
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 (file)
index 0000000..718efbe
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 (file)
index 0000000..0de0c21
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 (file)
index 0000000..db20801
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 (file)
index 0000000..78ac089
Binary files /dev/null and b/gfx/hud/luma/notify_neutral_captured.tga differ
index d810cd9f81ad2eefbf2a154ddc69291ebcb3ab91..9b32642a491a8f065ba9332d702cadf4312b7e99 100644 (file)
@@ -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;
index ab87477747a52ed53d7e255bd2bfeea1ff784c6e..0d6e97cbb5f198dfa4152ea9192ffb5fde8e9bf1 100644 (file)
@@ -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)
index 978fb865a0c1a7031dd7cc590da72da14ebff270..a36dc23c2925f0ddb299de38bea4de2c689e6e2f 100644 (file)
     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"), "")
     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!"), "")
index f064e152b409dc55d0224fd3c6532faea0d102d6..00c9982c3db8c8e5d32f77da478dd399432b6803 100644 (file)
@@ -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);