From fc7029c271a550175cdd4f82f5d7467d939a7d72 Mon Sep 17 00:00:00 2001 From: smallmodel <15067410+smallmodel@users.noreply.github.com> Date: Thu, 10 Aug 2023 19:31:39 +0200 Subject: [PATCH] Added stopwatch type --- code/cgame/cg_public.h | 2 +- code/cgame/cg_servercmds.c | 7 +++++++ code/fgame/bg_public.h | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/cgame/cg_public.h b/code/cgame/cg_public.h index e89bd149..0420d59f 100644 --- a/code/cgame/cg_public.h +++ b/code/cgame/cg_public.h @@ -67,7 +67,7 @@ extern "C" { typedef struct stopWatch_s { int iStartTime; int iEndTime; - + int eType; } stopWatch_t; typedef struct AliasList_s AliasList_t; diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c index a5caed19..a092c75c 100644 --- a/code/cgame/cg_servercmds.c +++ b/code/cgame/cg_servercmds.c @@ -241,6 +241,13 @@ static void CG_Stopwatch_f() if (cg_protocol >= PROTOCOL_MOHTA_MIN) { cgi.stopWatch->iStartTime = atoi(cgi.Argv(1)); + + if (cgi.Argc() > 3) { + cgi.stopWatch->eType = atoi(cgi.Argv(3)); + } else { + // Normal stop watch + cgi.stopWatch->eType = SWT_NORMAL; + } } else { // The base game has it wrong cgi.stopWatch->iStartTime = 1000 * atoi(cgi.Argv(1)); diff --git a/code/fgame/bg_public.h b/code/fgame/bg_public.h index ab1a077c..8b93fe35 100644 --- a/code/fgame/bg_public.h +++ b/code/fgame/bg_public.h @@ -574,6 +574,12 @@ movement on the server game. TEAM_AXIS } teamtype_t; + typedef enum { + SWT_NORMAL, + SWT_FUSE, + SWT_FUSE_WET + } stopWatchType_t; + // How many players on the overlay #define TEAM_MAXOVERLAY 32