From: Mario Date: Tue, 1 Dec 2020 10:51:30 +0000 (+1000) Subject: Add a setup function for target_checkpoint entities, fixes #2515 X-Git-Tag: xonotic-v0.8.5~657 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e90a0c6367266d718247676bf068ef275182987a;p=xonotic%2Fxonotic-data.pk3dir.git Add a setup function for target_checkpoint entities, fixes #2515 --- 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) {