]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix/clean/change some things
authorSamual Lenks <samual@xonotic.org>
Sat, 15 Dec 2012 07:02:09 +0000 (02:02 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 15 Dec 2012 07:02:09 +0000 (02:02 -0500)
qcsrc/common/notifications.qc
qcsrc/server/g_damage.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc

index 9ad13d73ba10e1487e5fa01709d4a3b4973e40b1..7fac0f1f0a87a98e5f4d4fe5a6f216904f13cccd 100644 (file)
@@ -41,7 +41,8 @@
     FRAG_PING: show the ping of a player
     FRAG_STATS: show health/armor/ping of a player
     FRAG_POS: show score status and position in the match of a player
-    SPREE_FRAG: find out if the player is on a kill spree/how many kills they have
+    SPREE_CEN: centerprint notif for kill spree/how many kills they have
+    SPREE_INF: info notif for kill spree/how many kills they have
     SPREE_END: placed at the end of murder messages to show ending of sprees
     SPREE_LOST: placed at the end of suicide messages to show losing of sprees
     DEATH_TEAM: show the full name of the team a player is switching from
@@ -53,16 +54,18 @@ string got_commandkey;
 #define FRAG_PING ((f2 != BOT_PING) ? sprintf(CCR(_("\n(Ping ^2%d^BG)")), f2) : "")
 #define FRAG_STATS sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), f1, f2, ((f3 != BOT_PING) ? sprintf(CCR(_(" (Ping ^2%d^BG)")), f3) : ""))
 #define FRAG_POS ((Should_Print_Score_Pos(f1)) ? sprintf("\n^BG%s", Read_Score_Pos(f1)) : "")
-#define SPREE_FRAG (((f1 == 3) || (f1 == 5) || (f1 == 10) || (f1 == 15) || (f1 == 20) || (f1 == 25) || (f1 == 30)) ? sprintf(normal_or_gentle(_("%d kill spree! "), _("%d score spree! ")), f1) : "")
-#define SPREE_END ((f1 >= 3) ? sprintf(normal_or_gentle(_(", ending their %d kill spree"), _(", ending their %d score spree")), f1) : "")
-#define SPREE_LOST ((f1 >= 3) ? sprintf(normal_or_gentle(_(", losing their %d kill spree"), _(", losing their %d score spree")), f1) : "")
+#define SPREE_CEN (((f1 == 3) || (f1 == 5) || (f1 == 10) || (f1 == 15) || (f1 == 20) || (f1 == 25) || (f1 == 30)) ? sprintf(normal_or_gentle(_("%d frag spree! "), _("%d score spree! ")), f1) : "")
+#define SPREE_INF (((f1 == 3) || (f1 == 5) || (f1 == 10) || (f1 == 15) || (f1 == 20) || (f1 == 25) || (f1 == 30)) ? sprintf(normal_or_gentle(_("%d frag spree! "), _("%d score spree! ")), f1) : "")
+#define SPREE_END ((f1 >= 3) ? sprintf(normal_or_gentle(_(", ending their %d frag spree"), _(", ending their %d score spree")), f1) : "")
+#define SPREE_LOST ((f1 >= 3) ? sprintf(normal_or_gentle(_(", losing their %d frag spree"), _(", losing their %d score spree")), f1) : "")
 #define DEATH_TEAM Team_ColoredFullName(TEAM_SV_TO_CL(f1))
 #define WEAPON_NAME f1 // weaponorder[f1].netname
 #else
 #ifdef SVQC
 // SVQC replacements
-#define SPREE_END ((f1 >= 3) ? sprintf(normal_or_gentle(_(", ending their %d kill spree"), _(", ending their %d score spree")), f1) : "")
-#define SPREE_LOST ((f1 >= 3) ? sprintf(normal_or_gentle(_(", losing their %d kill spree"), _(", losing their %d score spree")), f1) : "")
+#define SPREE_INF (((f1 == 3) || (f1 == 5) || (f1 == 10) || (f1 == 15) || (f1 == 20) || (f1 == 25) || (f1 == 30)) ? sprintf(normal_or_gentle(_("%d frag spree! "), _("%d score spree! ")), f1) : "")
+#define SPREE_END ((f1 >= 3) ? sprintf(normal_or_gentle(_(", ending their %d frag spree"), _(", ending their %d score spree")), f1) : "")
+#define SPREE_LOST ((f1 >= 3) ? sprintf(normal_or_gentle(_(", losing their %d frag spree"), _(", losing their %d score spree")), f1) : "")
 #define DEATH_TEAM Team_ColoredFullName(f1)
 #define WEAPON_NAME f1 // weaponorder[f1].netname
 
@@ -285,17 +288,17 @@ string got_commandkey;
        MSG_CENTER_NOTIF(CENTER_DEATH_SELF_SWAMP,                               0, 0, NO_STR_ARG,                               NO_CPID,                                XPND2(0, 0), _("^K1You got stuck in a swamp!"), "") \
        MSG_CENTER_NOTIF(CENTER_DEATH_SELF_CHEAT,                               0, 0, NO_STR_ARG,                               NO_CPID,                                XPND2(0, 0), _("^K1You unfairly eliminated yourself!"), "") \
        MSG_CENTER_NOTIF(CENTER_DEATH_SELF_TOUCHEXPLODE,                0, 0, NO_STR_ARG,                               NO_CPID,                                XPND2(0, 0), _("^K1You died in an accident!"), "") \
-       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAG,                                              1, 1, XPND2(SPREE_FRAG, s1),                                                    NO_CPID, XPND2(0, 0), _("^K3%sYou fragged ^BG%s"), _("^K3%sYou scored against ^BG%s")) \
+       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAG,                                              1, 1, XPND2(SPREE_CEN, s1),                                                             NO_CPID, XPND2(0, 0), _("^K3%sYou fragged ^BG%s"), _("^K3%sYou scored against ^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAGGED,                                   1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1You were fragged by ^BG%s"), _("^K1You were scored against by ^BG%s")) \
-       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAG,                                  1, 1, XPND2(SPREE_FRAG, s1),                                                    NO_CPID, XPND2(0, 0), _("^K1%sYou typefragged ^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing")) \
+       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAG,                                  1, 1, XPND2(SPREE_CEN, s1),                                                             NO_CPID, XPND2(0, 0), _("^K1%sYou typefragged ^BG%s"), _("^K1%sYou scored against ^BG%s^K1 while they were typing")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAGGED,                               1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1You were typefragged by ^BG%s"), _("^K1You were scored against by ^BG%s^K1 while typing!")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAG_FIRST,                                1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K3First blood! You fragged ^BG%s"), _("^K3First score! You scored against ^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAGGED_FIRST,                             1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1First victim! You were fragged by ^BG%s"), _("^K1First casualty! You were scored against by ^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAG_FIRST,                    1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1First blood! You typefragged ^BG%s"), _("^K1First score! You scored against ^BG%s^K1 while they were typing")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAGGED_FIRST,                 1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1First victim! You were typefragged by ^BG%s"), _("^K1First casualty! You were scored against by ^BG%s^K1 while typing!")) \
-       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAG_VERBOSE,                              1, 2, XPND3(SPREE_FRAG, s1, FRAG_PING),                                 NO_CPID, XPND2(0, 0), _("^K3You fragged ^BG%s^BG%s"), _("^K3You scored against ^BG%s^BG%s")) \
+       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAG_VERBOSE,                              1, 2, XPND3(SPREE_CEN, s1, FRAG_PING),                                  NO_CPID, XPND2(0, 0), _("^K3You fragged ^BG%s^BG%s"), _("^K3You scored against ^BG%s^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAGGED_VERBOSE,                   1, 3, XPND2(s1, FRAG_STATS),                                                    NO_CPID, XPND2(0, 0), _("^K1You were fragged by ^BG%s^BG%s"), _("^K1You were scored against by ^BG%s^BG%s")) \
-       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE,                  1, 2, XPND3(SPREE_FRAG, s1, FRAG_PING),                                 NO_CPID, XPND2(0, 0), _("^K1You typefragged ^BG%s^BG%s"), _("^K1You scored against ^BG%s^K1 while they were typing^BG%s")) \
+       MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE,                  1, 2, XPND3(SPREE_CEN, s1, FRAG_PING),                                  NO_CPID, XPND2(0, 0), _("^K1You typefragged ^BG%s^BG%s"), _("^K1You scored against ^BG%s^K1 while they were typing^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE,               1, 3, XPND2(s1, FRAG_STATS),                                                    NO_CPID, XPND2(0, 0), _("^K1You were typefragged by ^BG%s^BG%s"), _("^K1You were scored against by ^BG%s^K1 while typing^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAG_FIRST_VERBOSE,                1, 1, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K3First blood! You fragged ^BG%s"), _("^K3First score! You scored against ^BG%s")) \
        MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_FRAGGED_FIRST_VERBOSE,             1, 3, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1First victim! You were fragged by ^BG%s"), _("^K1First casualty! You were scored against by ^BG%s")) \
@@ -305,12 +308,6 @@ string got_commandkey;
        MSG_CENTER_NOTIF(CENTER_DEATH_TEAMKILL_FRAGGED,                                 1, 0, s1,                                                                                               NO_CPID, XPND2(0, 0), _("^K1You were fragged by ^BG%s^K1, a team mate"), _("^K1You were scored against by ^BG%s^K1, a team mate")) \
        MSG_CENTER_NOTIF(CENTER_WEAPON_MARBLES_LOST,                    1, 1, XPND2(s1, WEAPON_NAME),   NO_CPID,                                XPND2(0, 0), _("^K1You lost your marbles against ^BG%s^K1 using the ^BG%s!"), "")
 
-/*#define ADD_TO_LIST(list,newitem) \
-       #define MSG_WEAPON_NOTIFICATIONS \
-               MSG_WEAPON_NOTIFICATIONS \
-               item \
-                nothing */
-
 #define MSG_WEAPON_NOTIFICATIONS \
        MSG_WEAPON_NOTIF(WEAPON_EMPTY,                                                  NO_MSG,                                                                         NO_MSG) \
        MSG_WEAPON_NOTIF(WEAPON_THINKING_WITH_PORTALS,                  INFO_WEAPON_THINKING_WITH_PORTALS,                      NO_MSG) \
index 39acca6c13da22158e2613b544f41e4429f6d192..0e67dada72d135f755389dab6b98daeb65028b20 100644 (file)
@@ -381,9 +381,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
        float f1 = NO_FL_ARG, f2 = NO_FL_ARG, f3 = NO_FL_ARG;
        float notif_firstblood;
 
-
-       dprint(sprintf("Obituary(): Deathtype = %s (%d), Attacker = %s, Inflictor = %s, Target = %s...\n", Deathtype_Name(deathtype), deathtype, attacker.netname, inflictor.netname, targ.netname));
-
+       //dprint(sprintf("Obituary(): Deathtype = %s (%d), Attacker = %s, Inflictor = %s, Target = %s...\n", Deathtype_Name(deathtype), deathtype, attacker.netname, inflictor.netname, targ.netname));
 
        // =======
        // SUICIDE
@@ -432,7 +430,6 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                }
        }
 
-
        // ======
        // MURDER
        // ======
@@ -458,8 +455,6 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
 
                        // In this case, the death message will ALWAYS be "foo was betrayed by bar"
                        // No need for specific death/weapon messages...
-                       //if(DEATH_WEAPONOF(deathtype)) { print("Currently unhandled...\n"); }
-                       //else { Obituary_SpecialDeath(targ, TRUE, deathtype, s2, s1, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); }
                }
                else
                {
index 67a1e4e60ac64c6fb462c2b3b104369715a2c2d5..9e6a3ac8ce0a0217087218e2d8d3c0099f8515a8 100644 (file)
@@ -220,9 +220,13 @@ float w_hlac(float req)
                W_Reload(min(autocvar_g_balance_hlac_primary_ammo, autocvar_g_balance_hlac_secondary_ammo), autocvar_g_balance_hlac_reload_ammo, autocvar_g_balance_hlac_reload_time, "weapons/reload.wav");
        }
        else if (req == WR_SUICIDEMESSAGE)
+       {
                return WEAPON_HLAC_SUICIDE;
+       }
        else if (req == WR_KILLMESSAGE)
+       {
                return WEAPON_HLAC_MURDER;
+       }
        return TRUE;
 }
 #endif
index f07ec07ca655a5bd94ac6afd4faa4bd6b64d8155..10a327cdb57d9486f06e987d9562eaeb0255e23b 100644 (file)
@@ -266,9 +266,13 @@ float w_hook(float req)
                self.hook_refire = time;
        }
        else if (req == WR_SUICIDEMESSAGE)
+       {
                return FALSE;
+       }
        else if (req == WR_KILLMESSAGE)
+       {
                return WEAPON_HOOK_MURDER;
+       }
        return TRUE;
 }
 #endif