From: terencehill Date: Mon, 19 Jun 2023 09:23:21 +0000 (+0200) Subject: Undefine SCO_LABEL and remove redundant default case. Also document the inverted... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=111cb0864a17aeeb4168607e899f94ee1e49eaa4;p=xonotic%2Fxonotic-data.pk3dir.git Undefine SCO_LABEL and remove redundant default case. Also document the inverted logic of BotShouldAttack --- 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) \