From e83e51297e7844f3f9a93f47e5592746bb6489e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=BE=D0=B2?= <22411953+Vladislav4KZ@users.noreply.github.com> Date: Sun, 11 Jan 2026 18:21:51 +0000 Subject: [PATCH] client: forward the first argument of the client spec_mode command to the server specmode; fixes broken spectator mode switching in the spectator GUI --- cl_dll/hud_spectator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cl_dll/hud_spectator.cpp b/cl_dll/hud_spectator.cpp index 2319f23a..69c6065a 100644 --- a/cl_dll/hud_spectator.cpp +++ b/cl_dll/hud_spectator.cpp @@ -909,6 +909,10 @@ void CHudSpectator::SetModes(int iNewMainMode, int iNewInsetMode) // if we are NOT in HLTV mode, main spectator mode is set on server if ( !gEngfuncs.IsSpectateOnly() ) { + char cmdstring[32]; + // forward command to server + sprintf(cmdstring,"specmode %i",iNewMainMode ); + gEngfuncs.pfnServerCmd(cmdstring); return; }