From e90a0c6367266d718247676bf068ef275182987a Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 1 Dec 2020 20:51:30 +1000 Subject: [PATCH] Add a setup function for target_checkpoint entities, fixes #2515 --- qcsrc/server/race.qc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index f66ca7c8d..70a98083e 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -1041,7 +1041,7 @@ spawnfunc(trigger_race_checkpoint) InitializeEntity(this, trigger_race_checkpoint_verify, INITPRIO_FINDTARGET); } -spawnfunc(target_checkpoint) // defrag entity +void target_checkpoint_setup(entity this) { if(!g_race && !g_cts) { delete(this); return; } defrag_ents = 1; @@ -1086,8 +1086,15 @@ spawnfunc(target_checkpoint) // defrag entity InitializeEntity(this, trigger_race_checkpoint_verify, INITPRIO_FINDTARGET); } -spawnfunc(target_startTimer) { spawnfunc_target_checkpoint(this); } -spawnfunc(target_stopTimer) { spawnfunc_target_checkpoint(this); } +spawnfunc(target_checkpoint) +{ + // xonotic defrag entity + target_checkpoint_setup(this); +} + +// compatibility entity names +spawnfunc(target_startTimer) { target_checkpoint_setup(this); } +spawnfunc(target_stopTimer) { target_checkpoint_setup(this); } void race_AbandonRaceCheck(entity p) { -- 2.39.2