diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c index 17a2e9cb..093baa1d 100644 --- a/code/client/cl_cgame.c +++ b/code/client/cl_cgame.c @@ -734,13 +734,14 @@ void CL_InitCGame( void ) { Com_sprintf( cl.mapname, sizeof( cl.mapname ), "maps/%s.bsp", mapname ); // load the dll or bytecode - if ( cl_connectedToPureServer != 0 ) { + interpret = Cvar_VariableValue("vm_cgame"); + if(cl_connectedToPureServer) + { // if sv_pure is set we only allow qvms to be loaded - interpret = VMI_COMPILED; - } - else { - interpret = Cvar_VariableValue( "vm_cgame" ); + if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE) + interpret = VMI_COMPILED; } + cgvm = VM_Create( "cgame", CL_CgameSystemCalls, interpret ); if ( !cgvm ) { Com_Error( ERR_DROP, "VM_Create on cgame failed" ); diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c index 7d633afa..38441647 100644 --- a/code/client/cl_ui.c +++ b/code/client/cl_ui.c @@ -1098,13 +1098,14 @@ void CL_InitUI( void ) { vmInterpret_t interpret; // load the dll or bytecode - if ( cl_connectedToPureServer != 0 ) { + interpret = Cvar_VariableValue("vm_ui"); + if(cl_connectedToPureServer) + { // if sv_pure is set we only allow qvms to be loaded - interpret = VMI_COMPILED; - } - else { - interpret = Cvar_VariableValue( "vm_ui" ); + if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE) + interpret = VMI_COMPILED; } + uivm = VM_Create( "ui", CL_UISystemCalls, interpret ); if ( !uivm ) { Com_Error( ERR_FATAL, "VM_Create on UI failed" );