[QUOTE=El Stupido;147795]
void forcehunk(void){
char server[MAX_CVAR_VALUE_STRING];
char hunk[MAX_CVAR_VALUE_STRING];
char base[MAX_CVAR_VALUE_STRING];
char game[MAX_CVAR_VALUE_STRING];
char *p;
trap_Cvar_VariableStringBuffer("com_hunkMegs",hunk,sizeof(hunk));
if(atoi(hunk)<128){
trap_Cvar_VariableStringBuffer("cl_currentServerIP",server,sizeof(server));
trap_Cvar_VariableStringBuffer("fs_basePath",base,sizeof(base));
trap_Cvar_VariableStringBuffer("fs_game",game,sizeof(game));
#ifdef WIN32
p=va("%s/et.exe",base);
#else
p=va("%s/et",base);
#endif
execl(p,p,"+set","fs_game",game,"+set","com_hunkmegs","128","+connect",server,NULL);
trap_SendConsoleCommand("quit
");
}
}
This goes to CG_Init below CG_ParseWolfinfo. It works fine besides on linux it seems to screw up sound on some installs . I think this is related to the new process starting before the old one terminates but i didnt have time to look into it yet.[/QUOTE]
Has anybody tested this? I wonder if this works…
