From 111cb0864a17aeeb4168607e899f94ee1e49eaa4 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 19 Jun 2023 11:23:21 +0200 Subject: [PATCH] Undefine SCO_LABEL and remove redundant default case. Also document the inverted logic of BotShouldAttack --- qcsrc/client/hud/panel/scoreboard.qc | 2 +- qcsrc/server/mutators/events.qh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 7a3d3ede8..35227ffab 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -176,9 +176,9 @@ string Label_getInfo(string label, int mode) SCO_LABEL(_("SCO^teamkills"), "teamkills", " ", _("Number of teamkills")); SCO_LABEL(_("SCO^ticks"), "ticks", " ", _("Number of ticks (Domination)")); SCO_LABEL(_("SCO^time"), "time", " ", _("Total time raced (Race/CTS)")); - default: return label; } return label; +#undef SCO_LABEL } bool scoreboard_ui_disabling; diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index ce9f95826..46fb4ede1 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -621,7 +621,10 @@ MUTATOR_HOOKABLE(SetWeaponreplace, EV_SetWeaponreplace); /**/ MUTATOR_HOOKABLE(Item_RespawnCountdown, EV_Item_RespawnCountdown); -/** called when a bot checks a target to attack */ +/** + * called when a bot checks a target to attack + * return false to allow the bot to attack the target (inverted logic) + */ #define EV_BotShouldAttack(i, o) \ /** bot */ i(entity, MUTATOR_ARGV_0_entity) \ /** target */ i(entity, MUTATOR_ARGV_1_entity) \ -- 2.39.2