From c83b9028da08927310b92252cc01ccd92860ab87 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 13 Feb 2017 17:54:14 +1000 Subject: [PATCH] Add a hidden option to allow checkpoints to not count as a cheat --- qcsrc/server/cheats.qc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 631f38227..421de5373 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -131,6 +131,7 @@ spawnfunc(info_autoscreenshot) // this one just has to exist } +bool autocvar_g_allow_checkpoints; float CheatImpulse(entity this, int imp) { BEGIN_CHEAT_FUNCTION(); @@ -185,7 +186,8 @@ float CheatImpulse(entity this, int imp) CheatCommand(this, tokenize_console("give all")); break; // already counted as cheat case CHIMPULSE_SPEEDRUN.impulse: - IS_CHEAT(this, imp, 0, 0); + if(!autocvar_g_allow_checkpoints) + IS_CHEAT(this, imp, 0, 0); if(this.personal) { this.speedrunning = true; -- 2.39.2