From 41614bc854a0e104f3ef3049899e14e284b2994a Mon Sep 17 00:00:00 2001 From: Oscar Linderholm Date: Sat, 4 Oct 2025 12:59:47 +0200 Subject: [PATCH] Add f_countdown{start,break} If the above aliases are set, the commands in it will be executed when countdown starts or breaks respectively. --- src/cl_parse.c | 9 +++++++++ src/tp_triggers.c | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/cl_parse.c b/src/cl_parse.c index 8ced324ae..0c4fcc1da 100644 --- a/src/cl_parse.c +++ b/src/cl_parse.c @@ -2363,6 +2363,15 @@ void CL_ProcessServerInfo (void) } } + if (countdown && cl.countdown) + { + TP_ExecTrigger("f_countdownstart"); + } + else if (standby && !cl.standby && !countdown && cl.countdown) + { + TP_ExecTrigger("f_countdownbreak"); + } + cl.standby = standby; cl.countdown = countdown; diff --git a/src/tp_triggers.c b/src/tp_triggers.c index 864cd25c4..2cf8135d3 100644 --- a/src/tp_triggers.c +++ b/src/tp_triggers.c @@ -93,7 +93,9 @@ f_trigger_t f_triggers[] = { {"f_flash", true, true}, {"f_bonusflash", true, true}, - {"f_demomatchstart", false, false} + {"f_demomatchstart", false, false}, + {"f_countdownstart", false, false}, + {"f_countdownbreak", false, false} }; #define num_f_triggers (sizeof(f_triggers) / sizeof(f_triggers[0]))