mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Allow interpreted VM on pure servers
This commit is contained in:
parent
7eba074ce4
commit
b93a88455a
2 changed files with 12 additions and 10 deletions
|
@ -734,13 +734,14 @@ void CL_InitCGame( void ) {
|
||||||
Com_sprintf( cl.mapname, sizeof( cl.mapname ), "maps/%s.bsp", mapname );
|
Com_sprintf( cl.mapname, sizeof( cl.mapname ), "maps/%s.bsp", mapname );
|
||||||
|
|
||||||
// load the dll or bytecode
|
// 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
|
// if sv_pure is set we only allow qvms to be loaded
|
||||||
|
if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE)
|
||||||
interpret = VMI_COMPILED;
|
interpret = VMI_COMPILED;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
interpret = Cvar_VariableValue( "vm_cgame" );
|
|
||||||
}
|
|
||||||
cgvm = VM_Create( "cgame", CL_CgameSystemCalls, interpret );
|
cgvm = VM_Create( "cgame", CL_CgameSystemCalls, interpret );
|
||||||
if ( !cgvm ) {
|
if ( !cgvm ) {
|
||||||
Com_Error( ERR_DROP, "VM_Create on cgame failed" );
|
Com_Error( ERR_DROP, "VM_Create on cgame failed" );
|
||||||
|
|
|
@ -1098,13 +1098,14 @@ void CL_InitUI( void ) {
|
||||||
vmInterpret_t interpret;
|
vmInterpret_t interpret;
|
||||||
|
|
||||||
// load the dll or bytecode
|
// 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
|
// if sv_pure is set we only allow qvms to be loaded
|
||||||
|
if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE)
|
||||||
interpret = VMI_COMPILED;
|
interpret = VMI_COMPILED;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
interpret = Cvar_VariableValue( "vm_ui" );
|
|
||||||
}
|
|
||||||
uivm = VM_Create( "ui", CL_UISystemCalls, interpret );
|
uivm = VM_Create( "ui", CL_UISystemCalls, interpret );
|
||||||
if ( !uivm ) {
|
if ( !uivm ) {
|
||||||
Com_Error( ERR_FATAL, "VM_Create on UI failed" );
|
Com_Error( ERR_FATAL, "VM_Create on UI failed" );
|
||||||
|
|
Loading…
Reference in a new issue