diff --git a/engine/client/cl_input.c b/engine/client/cl_input.c index 201f86f0e..a1eb5606d 100644 --- a/engine/client/cl_input.c +++ b/engine/client/cl_input.c @@ -49,7 +49,7 @@ vec3_t mousemovements[MAX_SPLITS]; /*kinda a hack...*/ static int con_splitmodifier; -cvar_t cl_forcesplitclient = CVAR("cl_forcesplitclient", "0"); +cvar_t cl_forcesplitclient = CVAR("in_forcesplitclient", "0"); extern cvar_t cl_splitscreen; int CL_TargettedSplit(qboolean nowrap) { diff --git a/engine/common/cmd.c b/engine/common/cmd.c index ac1201d24..9f950936b 100644 --- a/engine/common/cmd.c +++ b/engine/common/cmd.c @@ -1823,6 +1823,7 @@ so when they are typed in at the console, they will need to be forwarded. */ void Cmd_ForwardToServer (void) { + int sp; if (cls.state == ca_disconnected) { if (cl_warncmd.ival) @@ -1841,10 +1842,21 @@ void Cmd_ForwardToServer (void) } #endif - if (Cmd_Argc() > 1) - CL_SendClientCommand(true, "%s %s", Cmd_Argv(0), Cmd_Args()); + sp = CL_TargettedSplit(false); + if (sp) + { + if (Cmd_Argc() > 1) + CL_SendClientCommand(true, "%i %s %s", sp+1, Cmd_Argv(0), Cmd_Args()); + else + CL_SendClientCommand(true, "%i %s", sp+1, Cmd_Argv(0)); + } else - CL_SendClientCommand(true, "%s", Cmd_Argv(0)); + { + if (Cmd_Argc() > 1) + CL_SendClientCommand(true, "%s %s", Cmd_Argv(0), Cmd_Args()); + else + CL_SendClientCommand(true, "%s", Cmd_Argv(0)); + } } // don't forward the first argument