engine: client: send expected cvar not found string for old protocol cvar query
This commit is contained in:
parent
03c8ea14cc
commit
9fe58aaabc
2 changed files with 13 additions and 6 deletions
|
@ -1993,7 +1993,7 @@ Find the client cvar value
|
||||||
and sent it back to the server
|
and sent it back to the server
|
||||||
==============
|
==============
|
||||||
*/
|
*/
|
||||||
void CL_ParseCvarValue( sizebuf_t *msg, const qboolean ext )
|
void CL_ParseCvarValue( sizebuf_t *msg, const qboolean ext, const connprotocol_t proto )
|
||||||
{
|
{
|
||||||
const char *cvarName, *response;
|
const char *cvarName, *response;
|
||||||
convar_t *cvar;
|
convar_t *cvar;
|
||||||
|
@ -2016,7 +2016,14 @@ void CL_ParseCvarValue( sizebuf_t *msg, const qboolean ext )
|
||||||
else
|
else
|
||||||
response = cvar->string;
|
response = cvar->string;
|
||||||
}
|
}
|
||||||
else response = "Bad CVAR request";
|
else if( proto == PROTO_LEGACY )
|
||||||
|
{
|
||||||
|
response = "Not Found";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response = "Bad CVAR request";
|
||||||
|
}
|
||||||
|
|
||||||
if( ext )
|
if( ext )
|
||||||
{
|
{
|
||||||
|
@ -2476,10 +2483,10 @@ void CL_ParseServerMessage( sizebuf_t *msg )
|
||||||
CL_ParseResLocation( msg );
|
CL_ParseResLocation( msg );
|
||||||
break;
|
break;
|
||||||
case svc_querycvarvalue:
|
case svc_querycvarvalue:
|
||||||
CL_ParseCvarValue( msg, false );
|
CL_ParseCvarValue( msg, false, PROTO_CURRENT );
|
||||||
break;
|
break;
|
||||||
case svc_querycvarvalue2:
|
case svc_querycvarvalue2:
|
||||||
CL_ParseCvarValue( msg, true );
|
CL_ParseCvarValue( msg, true, PROTO_CURRENT );
|
||||||
break;
|
break;
|
||||||
case svc_exec:
|
case svc_exec:
|
||||||
CL_ParseExec( msg );
|
CL_ParseExec( msg );
|
||||||
|
|
|
@ -595,10 +595,10 @@ void CL_ParseLegacyServerMessage( sizebuf_t *msg )
|
||||||
CL_ParseResLocation( msg );
|
CL_ParseResLocation( msg );
|
||||||
break;
|
break;
|
||||||
case svc_querycvarvalue:
|
case svc_querycvarvalue:
|
||||||
CL_ParseCvarValue( msg, false );
|
CL_ParseCvarValue( msg, false, PROTO_LEGACY );
|
||||||
break;
|
break;
|
||||||
case svc_querycvarvalue2:
|
case svc_querycvarvalue2:
|
||||||
CL_ParseCvarValue( msg, true );
|
CL_ParseCvarValue( msg, true, PROTO_LEGACY );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CL_ParseUserMessage( msg, cmd );
|
CL_ParseUserMessage( msg, cmd );
|
||||||
|
|
Loading…
Add table
Reference in a new issue