]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
renumber notification types to annoy mi..., I mean, to prevent clashes with future...
authorRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 16:17:39 +0000 (17:17 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 16:17:39 +0000 (17:17 +0100)
qcsrc/client/hud.qc
qcsrc/common/constants.qh

index a167ef0a433896f83b81c8e1a3f798abdb341a1a..ce9c29cd4068c4190ee0722f195a59f2288d19f4 100644 (file)
@@ -2062,7 +2062,7 @@ void HUD_Notify (void)
        float width_attacker;
        string attacker, victim;
 
-       float i, j, w, step, limit;
+       float i, j, w, type, step, limit;
        if(autocvar_hud_panel_notify_flip) //order items from the top down
        {
                i = 0;
@@ -2111,63 +2111,63 @@ void HUD_Notify (void)
 
                s = "";
 
-               w = -1;
-               w = DEATH_WEAPONOF(killnotify_deathtype[j]);
+               type = killnotify_deathtype[j];
+               w = DEATH_WEAPONOF(type);
 
                // TODO: maybe print in team colors?
                //
                // Y [used by] X
                if(killnotify_actiontype[j] == 0) 
                {
-                       if(killnotify_deathtype[j] == DEATH_GENERIC)
+                       if(type == DEATH_GENERIC)
                        {
                                s = "notify_death";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_NOAMMO)
+                       else if(type == DEATH_NOAMMO)
                        {
                                s = "notify_outofammo";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_KILL)
+                       else if(type == DEATH_KILL)
                        {
                                s = "notify_selfkill";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_CAMP)
+                       else if(type == DEATH_CAMP)
                        {
                                s = "notify_camping";
                        }
-                       else if(killnotify_deathtype[j] == KILL_TEAM_RED)
+                       else if(type == KILL_TEAM_RED)
                        {
                                s = "notify_teamkill_red";
                        }
-                       else if(killnotify_deathtype[j] == KILL_TEAM_BLUE)
+                       else if(type == KILL_TEAM_BLUE)
                        {
                                s = "notify_teamkill_blue";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_DROWN)
+                       else if(type == DEATH_DROWN)
                        {
                                s = "notify_water";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_SLIME)
+                       else if(type == DEATH_SLIME)
                        {
                                s = "notify_slime";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_LAVA)
+                       else if(type == DEATH_LAVA)
                        {
                                s = "notify_lava";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_FALL)
+                       else if(type == DEATH_FALL)
                        {
                                s = "notify_fall";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_SHOOTING_STAR)
+                       else if(type == DEATH_SHOOTING_STAR)
                        {
                                s = "notify_shootingstar";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_HURTTRIGGER || killnotify_deathtype[j] == DEATH_CUSTOM)
+                       else if(type == DEATH_HURTTRIGGER || type == DEATH_CUSTOM)
                        {
                                s = "notify_death";
                        }
-                       else if(killnotify_deathtype[j] == INFO_GOTFLAG)
+                       else if(type == INFO_GOTFLAG)
                        {
                                if(killnotify_victims[j] == "^1RED^7 flag")
                                {
@@ -2178,7 +2178,7 @@ void HUD_Notify (void)
                                        s = "notify_blue_taken";
                                }
                        }
-                       else if(killnotify_deathtype[j] == INFO_RETURNFLAG)
+                       else if(type == INFO_RETURNFLAG)
                        {
                                if(killnotify_victims[j] == "^1RED^7 flag")
                                {
@@ -2189,7 +2189,7 @@ void HUD_Notify (void)
                                        s = "notify_blue_returned";
                                }
                        }
-                       else if(killnotify_deathtype[j] == INFO_LOSTFLAG)
+                       else if(type == INFO_LOSTFLAG)
                        {
                                if(killnotify_victims[j] == "^1RED^7 flag")
                                {
@@ -2200,7 +2200,7 @@ void HUD_Notify (void)
                                        s = "notify_blue_lost";
                                }
                        }
-                       else if(killnotify_deathtype[j] == INFO_CAPTUREFLAG)
+                       else if(type == INFO_CAPTUREFLAG)
                        {
                                if(killnotify_victims[j] == "^1RED^7 flag")
                                {
@@ -2211,11 +2211,11 @@ void HUD_Notify (void)
                                        s = "notify_blue_captured";
                                }
                        }
-                       else if(killnotify_deathtype[j] == KA_DROPBALL)
+                       else if(type == KA_DROPBALL)
                        {
                                s = "notify_balldropped";
                        }
-                       else if(killnotify_deathtype[j] == KA_PICKUPBALL)
+                       else if(type == KA_PICKUPBALL)
                        {
                                s = "notify_ballpickedup";
                        }
@@ -2233,15 +2233,15 @@ void HUD_Notify (void)
                // X [did action to] Y
                else
                {
-                       if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
+                       if(type & HITTYPE_SECONDARY && w == WEP_LASER)
                        {
                                s = "notify_melee_laser";
                        }
-                       else if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_SHOTGUN)
+                       else if(type & HITTYPE_SECONDARY && w == WEP_SHOTGUN)
                        {
                                s = "notify_melee_shotgun";
                        }
-                       else if(killnotify_deathtype[j] & HITTYPE_HEADSHOT && (w == WEP_RIFLE || w == WEP_MINSTANEX)) // all headshot weapons go here
+                       else if(type & HITTYPE_HEADSHOT && (w == WEP_RIFLE || w == WEP_MINSTANEX)) // all headshot weapons go here
                        {
                                s = "notify_headshot";
                        }
@@ -2250,55 +2250,55 @@ void HUD_Notify (void)
                                self = get_weaponinfo(w);
                                s = strcat("weapon", self.netname);
                        }
-                       else if(killnotify_deathtype[j] == KILL_TEAM_RED)
+                       else if(type == KILL_TEAM_RED)
                        {
                                s = "notify_teamkill_red";
                        }
-                       else if(killnotify_deathtype[j] == KILL_TEAM_BLUE)
+                       else if(type == KILL_TEAM_BLUE)
                        {
                                s = "notify_teamkill_red";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_TELEFRAG)
+                       else if(type == DEATH_TELEFRAG)
                        {
                                s = "notify_telefrag";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_DROWN)
+                       else if(type == DEATH_DROWN)
                        {
                                s = "notify_water";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_SLIME)
+                       else if(type == DEATH_SLIME)
                        {
                                s = "notify_slime";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_LAVA)
+                       else if(type == DEATH_LAVA)
                        {
                                s = "notify_lava";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_FALL)
+                       else if(type == DEATH_FALL)
                        {
                                s = "notify_fall";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_SHOOTING_STAR)
+                       else if(type == DEATH_SHOOTING_STAR)
                        {
                                s = "notify_shootingstar";
                        }
-                       else if(killnotify_deathtype[j] == DEATH_HURTTRIGGER || killnotify_deathtype[j] == DEATH_CUSTOM) // DEATH_CUSTOM is also void, right?
+                       else if(type == DEATH_HURTTRIGGER || type == DEATH_CUSTOM) // DEATH_CUSTOM is also void, right?
                        {
                                s = "notify_void";
                        }
-                       else if(killnotify_deathtype[j] == RACE_SERVER_RECORD)
+                       else if(type == RACE_SERVER_RECORD)
                        {
                                s = "race_newrecordserver";
                        }
-                       else if(killnotify_deathtype[j] == RACE_NEW_RANK)
+                       else if(type == RACE_NEW_RANK)
                        {
                                s = "race_newrankyellow";
                        }
-                       else if(killnotify_deathtype[j] == RACE_NEW_TIME)
+                       else if(type == RACE_NEW_TIME)
                        {
                                s = "race_newtime";
                        }
-                       else if(killnotify_deathtype[j] == RACE_FAIL)
+                       else if(type == RACE_FAIL)
                        {
                                s = "race_newfail";
                        }
index f03a5cf854456d0704c057c688d97f67a2871d05..7532b3f50b0a85a25dab66ae98a40ccc79dff39c 100644 (file)
@@ -464,38 +464,38 @@ float MSG_INFO = 5;
 float MSG_KA = 6;
 float MSG_RACE = 10;
 
-float KILL_TEAM_RED = 10301;
-float KILL_TEAM_BLUE = 10302;
-float KILL_TEAM_SPREE = 10303;
-float KILL_FIRST_BLOOD = 10304;
-float KILL_FIRST_VICTIM = 10305;
-float KILL_TYPEFRAG = 10306;
-float KILL_TYPEFRAGGED = 10307;
-float KILL_FRAG = 10308;
-float KILL_FRAGGED = 10309;
-float KILL_SPREE = 10310;
-float KILL_END_SPREE = 10311;
-float KILL_SPREE_3 = 10312;
-float KILL_SPREE_5 = 10313;
-float KILL_SPREE_10 = 10314;
-float KILL_SPREE_15 = 10315;
-float KILL_SPREE_20 = 10316;
-float KILL_SPREE_25 = 10317;
-float KILL_SPREE_30 = 10318;
-
-float INFO_GOTFLAG = 10319;
-float INFO_PICKUPFLAG = 10320;
-float INFO_LOSTFLAG = 10321;
-float INFO_RETURNFLAG = 10322;
-float INFO_CAPTUREFLAG = 10323;
-
-float KA_PICKUPBALL = 10350;
-float KA_DROPBALL = 10351;
-
-float RACE_SERVER_RECORD = 10400;
-float RACE_NEW_TIME = 10401;
-float RACE_NEW_RANK = 10402;
-float RACE_FAIL = 10403;
+float KILL_TEAM_RED = 12001;
+float KILL_TEAM_BLUE = 12002;
+float KILL_TEAM_SPREE = 12003;
+float KILL_FIRST_BLOOD = 12004;
+float KILL_FIRST_VICTIM = 12005;
+float KILL_TYPEFRAG = 12006;
+float KILL_TYPEFRAGGED = 12007;
+float KILL_FRAG = 12008;
+float KILL_FRAGGED = 12009;
+float KILL_SPREE = 12010;
+float KILL_END_SPREE = 12011;
+float KILL_SPREE_3 = 12012;
+float KILL_SPREE_5 = 12013;
+float KILL_SPREE_10 = 12014;
+float KILL_SPREE_15 = 12015;
+float KILL_SPREE_20 = 12016;
+float KILL_SPREE_25 = 12017;
+float KILL_SPREE_30 = 12018;
+
+float INFO_GOTFLAG = 13001;
+float INFO_PICKUPFLAG = 13002;
+float INFO_LOSTFLAG = 13003;
+float INFO_RETURNFLAG = 13004;
+float INFO_CAPTUREFLAG = 13005;
+
+float KA_PICKUPBALL = 14001;
+float KA_DROPBALL = 14002;
+
+float RACE_SERVER_RECORD = 15001;
+float RACE_NEW_TIME = 15002;
+float RACE_NEW_RANK = 15003;
+float RACE_FAIL = 15004;
 
 // weapon requests
 float WR_SETUP         = 1; // (SVQC) setup weapon data