From a1a861e01f30a258b64cb4bc943688a430d64c36 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Fri, 28 Sep 2012 21:52:23 -0400 Subject: [PATCH] Move ALL of the centerprints in CTF over to the new system --- gamemodes.cfg | 1 - qcsrc/common/notifications.qc | 42 +++++++++++++++-------- qcsrc/server/autocvars.qh | 1 - qcsrc/server/mutators/gamemode_ctf.qc | 49 +++++++++++++++------------ qcsrc/server/mutators/gamemode_ctf.qh | 4 +++ 5 files changed, 60 insertions(+), 37 deletions(-) diff --git a/gamemodes.cfg b/gamemodes.cfg index 6cff7e5a4..727b0775a 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -197,7 +197,6 @@ set g_ctf_flag_collect_delay 1 set g_ctf_flag_health 0 set g_ctf_flag_dropped_waypoint 2 "show dropped flag waypointsprite when a flag is lost. 1 = team only, 2 = for all players" set g_ctf_flag_dropped_floatinwater 200 "move upwards while in water at this velocity" -set g_ctf_flag_pickup_verbosename 0 "show the name of the person who picked up the flag too" set g_ctf_throw 1 "throwing allows circumventing carrierkill score, so enable this with care!" set g_ctf_throw_angle_max 90 "maximum upwards angle you can throw the flag" set g_ctf_throw_angle_min -90 "minimum downwards angle you can throw the flag" diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 0d8593fc3..16f4948c2 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -54,32 +54,46 @@ Guidlines (please try and follow these): ALWAYS start the string with a color, preferably background. - ALWAYS end messages with a new line. ALWAYS properly use tab spacing to even out the notifications. NEVER re-declare an event twice. NEVER add or remove fields from the format, it SHOULD already work. - ARIRE unir frk jvgu lbhe bja zbgure. (gvc sbe zvxrrhfn) -- Don't pay attention to this ^_^ + MSG_INFO messages must ALWAYS end with a new line: \n Be clean and simple with your notification naming, nothing too long. Keep the notifications in alphabetical order. + ARIRE unir frk jvgu lbhe bja zbgure. (gvc sbe zvxrrhfn) -- Don't pay attention to this ^_^ */ // flag.netname = ((teamnumber) ? "^1RED^7 flag" : "^4BLUE^7 flag"); // weaponorder[f1].netname #define MSG_INFO_NOTIFICATIONS \ - MSG_INFO_NOTIF(INFO_CTF_GOTFLAG_RED, 2, 1, XPND3(s1, s2, "foobar"), "notify_death", _("^F1%s^BG lost their marbles against ^F1%s^BG using the ^F2%s^BG\n"), "") \ + MSG_INFO_NOTIF(INFO_CTF_EVENT_PICKUP_RED, 2, 1, XPND3(s1, s2, "foobar"), "notify_death", _("^F1%s^BG lost their marbles against ^F1%s^BG using the ^F2%s^BG\n"), "") \ #undef MSG_INFO_NOTIF #define MSG_CENTER_NOTIFICATIONS \ + MSG_CENTER_NOTIF(CENTER_EMPTY, 0, 0, NO_STR_ARG, NO_CPID, XPND2(0, 0), "", "") \ MSG_CENTER_NOTIF(CENTER_CTF_CAPTURESHIELD_SHIELDED, 0, 0, NO_STR_ARG, CPID_CTF_CAPTURESHIELD, XPND2(0, 0), _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \ MSG_CENTER_NOTIF(CENTER_CTF_CAPTURESHIELD_FREE, 0, 0, NO_STR_ARG, CPID_CTF_CAPTURESHIELD, XPND2(0, 0), _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PASS_RED, 2, 0, XPND2(s1, s2), CPID_CTF_PASS, XPND2(0, 0), _("^BG%s passed the ^1RED^BG flag to %s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PASS_SENT_RED, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou passed the ^1RED^BG flag to %s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PASS_RECEIVED_RED, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou received the ^1RED^BG flag from %s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PASS_BLUE, 2, 0, XPND2(s1, s2), CPID_CTF_PASS, XPND2(0, 0), _("^BG%s passed the ^4BLUE^BG flag to %s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PASS_SENT_BLUE, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou passed the ^4BLUE^BG flag to %s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PASS_RECEIVED_BLUE, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou received the ^4BLUE^BG flag from %s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_RETURN, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou returned the ^F1%s"), "") \ - MSG_CENTER_NOTIF(CENTER_CTF_EVENT_CAPTURE, 0, 0, NO_STR_ARG, NO_CPID, XPND2(0, 0), _("^BGYou captured the ^F1%s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_OTHER_RED, 2, 0, XPND2(s1, s2), CPID_CTF_PASS, XPND2(0, 0), _("^BG%s passed the ^1RED^BG flag to %s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_OTHER_BLUE, 2, 0, XPND2(s1, s2), CPID_CTF_PASS, XPND2(0, 0), _("^BG%s passed the ^4BLUE^BG flag to %s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_SENT_RED, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou passed the ^1RED^BG flag to %s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_SENT_BLUE, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou passed the ^4BLUE^BG flag to %s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_RECEIVED_RED, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou received the ^1RED^BG flag from %s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_RECEIVED_BLUE, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGYou received the ^4BLUE^BG flag from %s"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_REQUESTING, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BGRequesting %s to pass you the flag"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_PASS_REQUESTED, 1, 0, s1, CPID_CTF_PASS, XPND2(0, 0), _("^BG%s requests you to pass the flag"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_RETURN_RED, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou returned the ^1RED^BG flag"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_RETURN_BLUE, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou returned the ^4BLUE^BG flag"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_CAPTURE_RED, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou captured the ^1RED^BG flag"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_CAPTURE_BLUE, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou captured the ^4BLUE^BG flag"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PICKUP_RED, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou got the ^1RED^BG flag!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PICKUP_BLUE, 0, 0, NO_STR_ARG, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYou got the ^4BLUE^BG flag!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PICKUP_TEAM, 1, 0, s1, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYour %steam mate^BG got the flag! Protect them!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PICKUP_TEAM_VERBOSE, 2, 0, XPND3(s1, s2, s1), CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGYour %steam mate (^BG%s%s)^BG got the flag! Protect them!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PICKUP_ENEMY, 1, 0, s1, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGThe %senemy^BG got your flag! Retrieve it!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_EVENT_PICKUP_ENEMY_VERBOSE, 2, 0, XPND3(s1, s2, s1), CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGThe %senemy (^BG%s%s)^BG got your flag! Retrieve it!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_STALEMATE_CARRIER, 0, 0, NO_STR_ARG, CPID_STALEMATE, XPND2(0, 0), _("^BGStalemate! Enemies can now see you on radar!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_STALEMATE_OTHER, 0, 0, NO_STR_ARG, CPID_STALEMATE, XPND2(0, 0), _("^BGStalemate! Flag carriers can now be seen by enemies on radar!"), "") \ + MSG_CENTER_NOTIF(CENTER_CTF_FLAG_THROW_PUNISH, 0, 1, f1, CPID_CTF_LOWPRIO, XPND2(0, 0), _("^BGToo many flag throws! Throwing disabled for %d seconds."), "") \ #undef MSG_CENTER_NOTIF #define MSG_WEAPON_NOTIFICATIONS \ @@ -288,7 +302,7 @@ void Read_Notification(void) #endif #ifdef SVQC -void Send_Notification(float net_type, entity client, float net_name, string s1, string s2, float f1, float f2, float f3) +void Send_Notification(entity client, float net_type, float net_name, string s1, string s2, float f1, float f2, float f3) { if(net_type && net_name) { @@ -349,7 +363,7 @@ void Send_Notification_ToTeam(float targetteam, entity except, float net_type, f if(tmp_entity.team == targetteam) if(tmp_entity != except) { - Send_Notification(net_type, tmp_entity, net_name, s1, s2, f1, f2, f3); + Send_Notification(tmp_entity, net_type, net_name, s1, s2, f1, f2, f3); } } } @@ -363,7 +377,7 @@ void Send_Notification_ToAll(entity except, float spectators, float net_type, fl if((tmp_entity.classname == STR_PLAYER) || spectators) if(tmp_entity != except) { - Send_Notification(net_type, tmp_entity, net_name, s1, s2, f1, f2, f3); + Send_Notification(tmp_entity, net_type, net_name, s1, s2, f1, f2, f3); } } } diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 237dc5651..86688d181 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -796,7 +796,6 @@ float autocvar_g_ctf_flag_dropped_waypoint; float autocvar_g_ctf_flag_dropped_floatinwater; float autocvar_g_ctf_flag_glowtrails; float autocvar_g_ctf_flag_health; -float autocvar_g_ctf_flag_pickup_verbosename; string autocvar_g_ctf_flag_red_model; float autocvar_g_ctf_flag_red_skin; float autocvar_g_ctf_flag_return_time; diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 0903810b9..3c481515a 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -166,9 +166,9 @@ void ctf_CaptureShield_Update(entity player, float wanted_status) if((wanted_status == player.ctf_captureshielded) && (updated_status != wanted_status)) // 0: shield only, 1: unshield only { if(updated_status) // TODO csqc notifier for this // Samual: How? - Send_CSQC_Centerprint_Generic(player, CPID_CTF_CAPTURESHIELD, "^3You are now ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Make some defensive scores before trying again.", 5, 0); + Send_Notification(player, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); else - Send_CSQC_Centerprint_Generic(player, CPID_CTF_CAPTURESHIELD, "^3You are now free.\n\n^3Feel free to ^1try to capture^3 the flag again\n^3if you think you will succeed.", 5, 0); + Send_Notification(player, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_FREE, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); player.ctf_captureshielded = updated_status; } @@ -191,7 +191,7 @@ void ctf_CaptureShield_Touch() vector othermid = (other.absmin + other.absmax) * 0.5; Damage(other, self, self, 0, DEATH_HURTTRIGGER, mymid, normalize(othermid - mymid) * ctf_captureshield_force); - Send_CSQC_Centerprint_Generic(other, CPID_CTF_CAPTURESHIELD, "^3You are ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Get some defensive scores before trying again.", 5, 0); + Send_Notification(other, MSG_CENTER, CENTER_CTF_CAPTURESHIELD_SHIELDED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); } void ctf_CaptureShield_Spawn(entity flag) @@ -287,11 +287,11 @@ void ctf_Handle_Retrieve(entity flag, entity player) FOR_EACH_REALPLAYER(tmp_player) { if(tmp_player == sender) - Send_Notification(MSG_CENTER, tmp_player, RED_OR_BLUE(flag, CENTER_CTF_EVENT_PASS_SENT_RED, CENTER_CTF_EVENT_PASS_SENT_BLUE), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); + Send_Notification(tmp_player, MSG_CENTER, RED_OR_BLUE(flag, CENTER_CTF_PASS_SENT_RED, CENTER_CTF_PASS_SENT_BLUE), player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); else if(tmp_player == player) - Send_Notification(MSG_CENTER, tmp_player, RED_OR_BLUE(flag, CENTER_CTF_EVENT_PASS_RECEIVED_RED, CENTER_CTF_EVENT_PASS_RECEIVED_BLUE), sender.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); + Send_Notification(tmp_player, MSG_CENTER, RED_OR_BLUE(flag, CENTER_CTF_PASS_RECEIVED_RED, CENTER_CTF_PASS_RECEIVED_BLUE), sender.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); else if(!IsDifferentTeam(tmp_player, sender)) - Send_Notification(MSG_CENTER, tmp_player, RED_OR_BLUE(flag, CENTER_CTF_EVENT_PASS_RED, CENTER_CTF_EVENT_PASS_BLUE), sender.netname, player.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); + Send_Notification(tmp_player, MSG_CENTER, RED_OR_BLUE(flag, CENTER_CTF_PASS_OTHER_RED, CENTER_CTF_PASS_OTHER_BLUE), sender.netname, player.netname, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); } // create new waypoint @@ -445,7 +445,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype) void ctf_Handle_Return(entity flag, entity player) { // messages and sounds - //centerprint(player, strcat("You returned the ", flag.netname)); + Send_Notification(player, MSG_CENTER, RED_OR_BLUE(flag, CENTER_CTF_EVENT_RETURN_RED, CENTER_CTF_EVENT_RETURN_BLUE), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); Send_KillNotification(player.netname, flag.netname, "", INFO_RETURNFLAG, MSG_INFO); sound(player, CH_TRIGGER, flag.snd_flag_returned, VOL_BASE, ATTN_NONE); ctf_EventLog("return", flag.team, player); @@ -497,19 +497,18 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype) // messages and sounds Send_KillNotification (player.netname, flag.netname, "", INFO_GOTFLAG, MSG_INFO); sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTN_NONE); - verbosename = ((autocvar_g_ctf_flag_pickup_verbosename) ? strcat(Team_ColorCode(player.team), "(^7", player.netname, Team_ColorCode(player.team), ") ") : ""); - + FOR_EACH_REALPLAYER(tmp_player) { if(tmp_player == player) { - centerprint(tmp_player, strcat("You got the ", flag.netname, "!")); - //if(ctf_stalemate) { centerprint(tmp_player, "Stalemate! Enemies can see you on radar!"); } + Send_Notification(tmp_player, MSG_CENTER, RED_OR_BLUE(flag, CENTER_CTF_EVENT_PICKUP_RED, CENTER_CTF_EVENT_PICKUP_BLUE), NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); + if(ctf_stalemate) { Send_Notification(player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); } } - //else if(!IsDifferentTeam(tmp_player, player)) - // centerprint(tmp_player, strcat("Your ", Team_ColorCode(player.team), "team mate ", verbosename, "^7got the flag! Protect them!")); - else if(!IsDifferentTeam(tmp_player, flag)) - centerprint(tmp_player, strcat("The ", Team_ColorCode(player.team), "enemy ", verbosename, "^7got your flag! Retrieve it!")); + else if(!IsDifferentTeam(tmp_player, player) && tmp_player != player) + Send_Notification(tmp_player, MSG_CENTER, (tmp_player.PICKUP_TEAM_VERBOSE ? CENTER_CTF_EVENT_PICKUP_TEAM_VERBOSE : CENTER_CTF_EVENT_PICKUP_TEAM), Team_ColorCode(player.team), (tmp_player.PICKUP_TEAM_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); + else if(IsDifferentTeam(tmp_player, player)) + Send_Notification(tmp_player, MSG_CENTER, (tmp_player.PICKUP_ENEMY_VERBOSE ? CENTER_CTF_EVENT_PICKUP_ENEMY_VERBOSE : CENTER_CTF_EVENT_PICKUP_ENEMY), Team_ColorCode(player.team), (tmp_player.PICKUP_ENEMY_VERBOSE ? player.netname : NO_STR_ARG), NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); } // scoring @@ -630,9 +629,9 @@ void ctf_CheckStalemate(void) { FOR_EACH_REALPLAYER(tmp_entity) if(tmp_entity.flagcarried) - centerprint(tmp_entity, "Stalemate! Enemies can now see you on radar!"); + Send_Notification(tmp_entity, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); else - centerprint(tmp_entity, "Stalemate! Flag carriers can now be seen by enemies on radar!"); + Send_Notification(tmp_entity, MSG_CENTER, CENTER_CTF_STALEMATE_OTHER, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); wpforenemy_announced = TRUE; } @@ -1842,13 +1841,13 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) { if(clienttype(head) == CLIENTTYPE_BOT) { - centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); + Send_Notification(player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); ctf_Handle_Throw(head, player, DROP_PASS); } else { - centerprint(head, strcat(player.netname, " requests you to pass the ", head.flagcarried.netname)); - centerprint(player, strcat("Requesting ", head.netname, " to pass you the ", head.flagcarried.netname)); + Send_Notification(head, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); + Send_Notification(player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG); } player.throw_antispam = time + autocvar_g_ctf_pass_wait; return TRUE; @@ -1885,7 +1884,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey) } else { - centerprint(player, strcat("Too many flag throws, throwing disabled for ", ftos(rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time)), " seconds.")); + Send_Notification(player, MSG_CENTER, CENTER_CTF_FLAG_THROW_PUNISH, NO_STR_ARG, NO_STR_ARG, rint((player.throw_prevtime + autocvar_g_ctf_throw_punish_delay) - time), NO_FL_ARG, NO_FL_ARG); return FALSE; } } @@ -2008,6 +2007,13 @@ MUTATOR_HOOKFUNCTION(ctf_BotRoles) return TRUE; } +MUTATOR_HOOKFUNCTION(ctf_GetCvars) +{ + GetCvars_handleFloat(get_cvars_s, get_cvars_f, PICKUP_TEAM_VERBOSE, "notification_CENTER_CTF_EVENT_PICKUP_TEAM_VERBOSE"); + GetCvars_handleFloat(get_cvars_s, get_cvars_f, PICKUP_ENEMY_VERBOSE, "notification_CENTER_CTF_EVENT_PICKUP_ENEMY_VERBOSE"); + return TRUE; +} + // ========== // Spawnfuncs @@ -2192,6 +2198,7 @@ MUTATOR_DEFINITION(gamemode_ctf) MUTATOR_HOOK(VehicleExit, ctf_VehicleExit, CBC_ORDER_ANY); MUTATOR_HOOK(AbortSpeedrun, ctf_AbortSpeedrun, CBC_ORDER_ANY); MUTATOR_HOOK(HavocBot_ChooseRule, ctf_BotRoles, CBC_ORDER_ANY); + MUTATOR_HOOK(GetCvars, ctf_GetCvars, CBC_ORDER_ANY); MUTATOR_ONADD { diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index b6ca033bb..383647129 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -130,3 +130,7 @@ vector havocbot_ctf_middlepoint; float havocbot_ctf_middlepoint_radius; void havocbot_role_ctf_setrole(entity bot, float role); + +// client notification cvars +.float PICKUP_TEAM_VERBOSE; +.float PICKUP_ENEMY_VERBOSE; -- 2.39.2