Skip to content

Commit e83e512

Browse files
committed
client: forward the first argument of the client spec_mode command to the server specmode; fixes broken spectator mode switching in the spectator GUI
1 parent f403f4b commit e83e512

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cl_dll/hud_spectator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,10 @@ void CHudSpectator::SetModes(int iNewMainMode, int iNewInsetMode)
909909
// if we are NOT in HLTV mode, main spectator mode is set on server
910910
if ( !gEngfuncs.IsSpectateOnly() )
911911
{
912+
char cmdstring[32];
913+
// forward command to server
914+
sprintf(cmdstring,"specmode %i",iNewMainMode );
915+
gEngfuncs.pfnServerCmd(cmdstring);
912916
return;
913917
}
914918

0 commit comments

Comments
 (0)