From 4ee93de36cc07483407155c8f2de62239c83eb65 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 17 Jul 2021 09:42:59 +0200 Subject: [PATCH] - added 'endofgame' CCMD. Not really good yet, but it does what's needed, i.e. write out the statistics for the current session. --- source/core/cheats.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/core/cheats.cpp b/source/core/cheats.cpp index d35aa7525..8d6e84abf 100644 --- a/source/core/cheats.cpp +++ b/source/core/cheats.cpp @@ -45,6 +45,7 @@ #include "gamecontrol.h" #include "screenjob.h" #include "mapinfo.h" +#include "statistics.h" CVAR(Bool, sv_cheats, true, CVAR_ARCHIVE|CVAR_SERVERINFO) CVAR(Bool, cl_blockcheats, false, 0) @@ -488,3 +489,9 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL) Printf("Time scale must be at least 0.05!\n"); } } + +CCMD(endofgame) +{ + STAT_Update(true); + ChangeLevel(nullptr, -1); +}