From 0d3c2687efbda63b43adf6ac59e44b479c9a4ffa Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 12 Feb 2022 22:26:11 +0100 Subject: [PATCH] Implement #2662 "Remove inability to use waypoints when the round is about to start". Allow cheat impulses too and forbid weapon reload. Since only a few impulses are now forbidden, turn impulse whitelist into a blacklist. --- qcsrc/server/impulse.qc | 79 +++-------------------------------------- 1 file changed, 4 insertions(+), 75 deletions(-) diff --git a/qcsrc/server/impulse.qc b/qcsrc/server/impulse.qc index 3fa3dc6c6..be66fe968 100644 --- a/qcsrc/server/impulse.qc +++ b/qcsrc/server/impulse.qc @@ -381,87 +381,16 @@ void ImpulseCommands(entity this) if (timeout_status == TIMEOUT_ACTIVE) return; // don't allow any impulses while the game is paused - // allow only weapon change impulses when not in round time if (round_handler_IsActive() && !round_handler_IsRoundStarted()) { + // impulses forbidden while waiting for the start of a round #define X(id) case IMP_##id.impulse: switch (imp) { - X(weapon_group_0) - X(weapon_group_1) - X(weapon_group_2) - X(weapon_group_3) - X(weapon_group_4) - X(weapon_group_5) - X(weapon_group_6) - X(weapon_group_7) - X(weapon_group_8) - X(weapon_group_9) - X(weapon_next_byid) - X(weapon_prev_byid) - X(weapon_next_bygroup) - X(weapon_prev_bygroup) - X(weapon_next_bypriority) - X(weapon_prev_bypriority) - X(weapon_last) - X(weapon_best) + X(weapon_drop) X(weapon_reload) - X(weapon_priority_0_prev) - X(weapon_priority_1_prev) - X(weapon_priority_2_prev) - X(weapon_priority_3_prev) - X(weapon_priority_4_prev) - X(weapon_priority_5_prev) - X(weapon_priority_6_prev) - X(weapon_priority_7_prev) - X(weapon_priority_8_prev) - X(weapon_priority_9_prev) - X(weapon_priority_0_next) - X(weapon_priority_1_next) - X(weapon_priority_2_next) - X(weapon_priority_3_next) - X(weapon_priority_4_next) - X(weapon_priority_5_next) - X(weapon_priority_6_next) - X(weapon_priority_7_next) - X(weapon_priority_8_next) - X(weapon_priority_9_next) - X(weapon_priority_0_best) - X(weapon_priority_1_best) - X(weapon_priority_2_best) - X(weapon_priority_3_best) - X(weapon_priority_4_best) - X(weapon_priority_5_best) - X(weapon_priority_6_best) - X(weapon_priority_7_best) - X(weapon_priority_8_best) - X(weapon_priority_9_best) - X(weapon_byid_0) - X(weapon_byid_1) - X(weapon_byid_2) - X(weapon_byid_3) - X(weapon_byid_4) - X(weapon_byid_5) - X(weapon_byid_6) - X(weapon_byid_7) - X(weapon_byid_8) - X(weapon_byid_9) - X(weapon_byid_10) - X(weapon_byid_11) - X(weapon_byid_12) - X(weapon_byid_13) - X(weapon_byid_14) - X(weapon_byid_15) - X(weapon_byid_16) - X(weapon_byid_17) - X(weapon_byid_18) - X(weapon_byid_19) - X(weapon_byid_20) - X(weapon_byid_21) - X(weapon_byid_22) - X(weapon_byid_23) - break; - default: return; + X(use) + return; } #undef X } -- 2.39.2