From: Samual Lenks Date: Fri, 23 Aug 2013 22:12:32 +0000 (-0400) Subject: Move flag pickup verbose to MSG_CHOICE X-Git-Tag: xonotic-v0.8.0~341^2~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=53e71e45b02b7662aa68be18bd515e218b4d5fc9;p=xonotic%2Fxonotic-data.pk3dir.git Move flag pickup verbose to MSG_CHOICE --- diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 6c55809ad..e4ac3e26f 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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; diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 1de05661b..2daadd4f7 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -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; } diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index 882b1064b..d03582389 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -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;