]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move flag pickup verbose to MSG_CHOICE
authorSamual Lenks <samual@xonotic.org>
Fri, 23 Aug 2013 22:12:32 +0000 (18:12 -0400)
committerSamual Lenks <samual@xonotic.org>
Fri, 23 Aug 2013 22:12:32 +0000 (18:12 -0400)
qcsrc/common/notifications.qh
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_ctf.qh

index 6c55809ad6d6336900deff9f58438672ce25b53a..e4ac3e26f0773063e9af9916186b49bb6fab026b 100644 (file)
@@ -737,10 +737,12 @@ void Send_Notification_WOCOVA(
                MSG_CHOICE_NOTIF(default, challow, prefix##PINK, chtype, optiona##PINK, optionb##PINK) \
        #endif
 #define MSG_CHOICE_NOTIFICATIONS \
-       MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG,          MSG_CENTER,  CENTER_DEATH_MURDER_FRAG,         CENTER_DEATH_MURDER_FRAG_VERBOSE) \
-       MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED,       MSG_CENTER,  CENTER_DEATH_MURDER_FRAGGED,      CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
-       MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG,      MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAG,     CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
-       MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAGGED,   MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAGGED,  CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
+       MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_TEAM,   MSG_CENTER,  CENTER_CTF_PICKUP_TEAM,           CENTER_CTF_PICKUP_TEAM_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 2, CHOICE_CTF_PICKUP_ENEMY,  MSG_CENTER,  CENTER_CTF_PICKUP_ENEMY,          CENTER_CTF_PICKUP_ENEMY_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAG,              MSG_CENTER,  CENTER_DEATH_MURDER_FRAG,         CENTER_DEATH_MURDER_FRAG_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_FRAGGED,           MSG_CENTER,  CENTER_DEATH_MURDER_FRAGGED,      CENTER_DEATH_MURDER_FRAGGED_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAG,          MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAG,     CENTER_DEATH_MURDER_TYPEFRAG_VERBOSE) \
+       MSG_CHOICE_NOTIF(1, 1, CHOICE_TYPEFRAGGED,       MSG_CENTER,  CENTER_DEATH_MURDER_TYPEFRAGGED,  CENTER_DEATH_MURDER_TYPEFRAGGED_VERBOSE)
        //MSG_CHOICE_NOTIF(2, CHOICE_)
 
 
@@ -1108,7 +1110,7 @@ entity msg_center_notifs[NOTIF_CENTER_MAX];
 entity msg_multi_notifs[NOTIF_MULTI_MAX];
 entity msg_choice_notifs[NOTIF_CHOICE_MAX];
 
-// general notification entity values
+// common notification entity values
 .float nent_default;
 .float nent_enabled;
 .float nent_type;
index 1de05661bed63d57a275f61c8d0709d2fb8c7232..2daadd4f7e1a30fe1999ad153cf38e5aba6b26c1 100644 (file)
@@ -476,7 +476,6 @@ void ctf_Handle_Return(entity flag, entity player)
 void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
 {
        // declarations
-       entity tmp_player; // temporary entity which the FOR_EACH_PLAYER loop uses to scan players
        float pickup_dropped_score; // used to calculate dropped pickup score
        
        // attach the flag to the player
@@ -501,30 +500,11 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
 
        // messages and sounds
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname);
+       Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_));
+       if(ctf_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER); }
+       Send_Notification(NOTIF_TEAM_EXCEPT, player, MSG_CENTER, CHOICE_CTF_PICKUP_TEAM, Team_ColorCode(player.team), player.netname);
+       Send_Notification(NOTIF_TEAM, flag, MSG_CENTER, CHOICE_CTF_PICKUP_ENEMY, Team_ColorCode(player.team), player.netname);
        sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTN_NONE);
-
-       FOR_EACH_REALPLAYER(tmp_player)
-       {
-               if(tmp_player == player)
-               {
-                       Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_));
-                       if(ctf_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER); }
-               }
-               else if(!IsDifferentTeam(tmp_player, player) && tmp_player != player)
-               {
-                       if(tmp_player.PICKUP_TEAM_VERBOSE)
-                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_TEAM_VERBOSE, Team_ColorCode(player.team), player.netname);
-                       else
-                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_TEAM, Team_ColorCode(player.team));
-               }
-               else if(IsDifferentTeam(tmp_player, player))
-               {
-                       if(tmp_player.PICKUP_ENEMY_VERBOSE)
-                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY_VERBOSE, Team_ColorCode(player.team), player.netname);
-                       else
-                               Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, CENTER_CTF_PICKUP_ENEMY, Team_ColorCode(player.team));
-               }
-       }
        
        // scoring
        PlayerScore_Add(player, SP_CTF_PICKUPS, 1);
@@ -2024,8 +2004,6 @@ MUTATOR_HOOKFUNCTION(ctf_BotRoles)
 MUTATOR_HOOKFUNCTION(ctf_GetCvars)
 {
        GetCvars_handleFloat(get_cvars_s, get_cvars_f, CAPTURE_VERBOSE, "notification_ctf_capture_verbose");
-       GetCvars_handleFloat(get_cvars_s, get_cvars_f, PICKUP_TEAM_VERBOSE, "notification_ctf_pickup_team_verbose");
-       GetCvars_handleFloat(get_cvars_s, get_cvars_f, PICKUP_ENEMY_VERBOSE, "notification_ctf_pickup_enemy_verbose");
        return TRUE;
 }
 
index 882b1064b49de78ce2d1c7dfcda641b4601839c5..d03582389e5ffe5cdd246c3be61dce84e11e0129 100644 (file)
@@ -134,10 +134,5 @@ void havocbot_role_ctf_setrole(entity bot, float role);
 
 // client notification stuff
 .float CAPTURE_VERBOSE;
-.float PICKUP_TEAM_VERBOSE;
-.float PICKUP_ENEMY_VERBOSE;
-#else
-var float autocvar_notification_ctf_pickup_team_verbose = FALSE;
-var float autocvar_notification_ctf_pickup_enemy_verbose = FALSE;
 #endif
 var float autocvar_notification_ctf_capture_verbose = FALSE;