[quake3-commits] r2182 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Sep 27 18:56:10 EDT 2011


Author: thilo
Date: 2011-09-27 18:56:10 -0400 (Tue, 27 Sep 2011)
New Revision: 2182

Modified:
   trunk/code/client/cl_cgame.c
   trunk/code/client/cl_ui.c
Log:
Allow interpreted VM on pure servers


Modified: trunk/code/client/cl_cgame.c
===================================================================
--- trunk/code/client/cl_cgame.c	2011-09-27 22:16:07 UTC (rev 2181)
+++ trunk/code/client/cl_cgame.c	2011-09-27 22:56:10 UTC (rev 2182)
@@ -734,13 +734,14 @@
 	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;
+		if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE)
+			interpret = VMI_COMPILED;
 	}
-	else {
-		interpret = Cvar_VariableValue( "vm_cgame" );
-	}
+
 	cgvm = VM_Create( "cgame", CL_CgameSystemCalls, interpret );
 	if ( !cgvm ) {
 		Com_Error( ERR_DROP, "VM_Create on cgame failed" );

Modified: trunk/code/client/cl_ui.c
===================================================================
--- trunk/code/client/cl_ui.c	2011-09-27 22:16:07 UTC (rev 2181)
+++ trunk/code/client/cl_ui.c	2011-09-27 22:56:10 UTC (rev 2182)
@@ -1098,13 +1098,14 @@
 	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;
+		if(interpret != VMI_COMPILED && interpret != VMI_BYTECODE)
+			interpret = VMI_COMPILED;
 	}
-	else {
-		interpret = Cvar_VariableValue( "vm_ui" );
-	}
+
 	uivm = VM_Create( "ui", CL_UISystemCalls, interpret );
 	if ( !uivm ) {
 		Com_Error( ERR_FATAL, "VM_Create on UI failed" );



More information about the quake3-commits mailing list