|
|
@ -1925,6 +1925,53 @@ void CL_ParseCvarValue2( sizebuf_t *msg ) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
============== |
|
|
|
|
|
|
|
CL_ParseExec |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Exec map/class specific configs |
|
|
|
|
|
|
|
============== |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void CL_ParseExec( sizebuf_t *msg ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
qboolean is_class; |
|
|
|
|
|
|
|
int class_idx; |
|
|
|
|
|
|
|
string mapname; |
|
|
|
|
|
|
|
const char *class_cfgs[] = { |
|
|
|
|
|
|
|
"", |
|
|
|
|
|
|
|
"exec scout.cfg\n", |
|
|
|
|
|
|
|
"exec sniper.cfg\n", |
|
|
|
|
|
|
|
"exec soldier.cfg\n", |
|
|
|
|
|
|
|
"exec demoman.cfg\n", |
|
|
|
|
|
|
|
"exec medic.cfg\n", |
|
|
|
|
|
|
|
"exec hwguy.cfg\n", |
|
|
|
|
|
|
|
"exec pyro.cfg\n", |
|
|
|
|
|
|
|
"exec spy.cfg\n", |
|
|
|
|
|
|
|
"exec engineer.cfg\n", |
|
|
|
|
|
|
|
"", |
|
|
|
|
|
|
|
"exec civilian.cfg\n" |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
is_class = MSG_ReadByte( msg ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( is_class ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
class_idx = MSG_ReadByte( msg ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( class_idx >= 0 && class_idx <= 11 && !Q_stricmp( GI->gamefolder, "tfc" ) ) |
|
|
|
|
|
|
|
Cbuf_AddText( class_cfgs[class_idx] ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if ( !Q_stricmp( GI->gamefolder, "tfc" ) ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Cbuf_AddText( "exec mapdefault.cfg\n" ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
COM_FileBase( clgame.mapname, mapname ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( COM_CheckString( mapname ) ) |
|
|
|
|
|
|
|
Cbuf_AddText( va( "exec %s.cfg\n", mapname ) ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
============== |
|
|
|
============== |
|
|
|
CL_DispatchUserMessage |
|
|
|
CL_DispatchUserMessage |
|
|
@ -2334,6 +2381,9 @@ void CL_ParseServerMessage( sizebuf_t *msg, qboolean normal_message ) |
|
|
|
case svc_querycvarvalue2: |
|
|
|
case svc_querycvarvalue2: |
|
|
|
CL_ParseCvarValue2( msg ); |
|
|
|
CL_ParseCvarValue2( msg ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case svc_exec: |
|
|
|
|
|
|
|
CL_ParseExec( msg ); |
|
|
|
|
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
CL_ParseUserMessage( msg, cmd ); |
|
|
|
CL_ParseUserMessage( msg, cmd ); |
|
|
|
cl.frames[cl.parsecountmod].graphdata.usr += MSG_GetNumBytesRead( msg ) - bufStart; |
|
|
|
cl.frames[cl.parsecountmod].graphdata.usr += MSG_GetNumBytesRead( msg ) - bufStart; |
|
|
|