From 5904b5457890afc691c6142668e9723f185d8887 Mon Sep 17 00:00:00 2001 From: diwoc <108992394+scoqx@users.noreply.github.com> Date: Mon, 16 Feb 2026 06:55:08 +0300 Subject: [PATCH] Scores/TeamCount fix Set scores and alive players on freeze after cgame loads (first connect and vid_restart) --- code/cgame/cg_servercmds.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/cgame/cg_servercmds.c b/code/cgame/cg_servercmds.c index d6dc26b0..00a6173a 100644 --- a/code/cgame/cg_servercmds.c +++ b/code/cgame/cg_servercmds.c @@ -187,8 +187,16 @@ void CG_SetConfigValues(void) { const char* s; - cgs.scores1 = atoi(CG_ConfigString(CS_SCORES1)); - cgs.scores2 = atoi(CG_ConfigString(CS_SCORES2)); + s = CG_ConfigString(CS_SCORES1); + cgs.scores1 = atoi(s); + cgs.osp.osp_teamcount1 = -1; + Q_sscanf(s, "%i %i", &cgs.scores1, &cgs.osp.osp_teamcount1); + + s = CG_ConfigString(CS_SCORES2); + cgs.scores2 = atoi(s); + cgs.osp.osp_teamcount2 = -1; + Q_sscanf(s, "%i %i", &cgs.scores2, &cgs.osp.osp_teamcount2); + cgs.levelStartTime = atoi(CG_ConfigString(CS_LEVEL_START_TIME)); if (cgs.gametype == GT_CTF) {