From 85fdc88c722f10362ce61e43beb7d43db594328f Mon Sep 17 00:00:00 2001 From: Sergei Shubin Date: Wed, 18 Mar 2026 14:04:12 +0800 Subject: [PATCH] Force vm_game/vm_cgame/vm_ui to DLL-only (0) when DLL_ONLY is defined Default was 2 (JIT/QVM), causing fallback to ui.qvm when DLL not found. Use CVAR_INIT|CVAR_ROM to prevent config files from overriding back to QVM. Mirrors the same pattern used for sv_pure in sv_init.c. Co-Authored-By: Claude Sonnet 4.6 --- code/qcommon/vm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c index 923c6ec..915b62f 100644 --- a/code/qcommon/vm.c +++ b/code/qcommon/vm.c @@ -64,9 +64,15 @@ VM_Init ============== */ void VM_Init( void ) { +#ifdef DLL_ONLY + Cvar_Get( "vm_cgame", "0", CVAR_INIT | CVAR_ROM ); + Cvar_Get( "vm_game", "0", CVAR_INIT | CVAR_ROM ); + Cvar_Get( "vm_ui", "0", CVAR_INIT | CVAR_ROM ); +#else Cvar_Get( "vm_cgame", "2", CVAR_ARCHIVE ); // !@# SHIP WITH SET TO 2 Cvar_Get( "vm_game", "2", CVAR_ARCHIVE ); // !@# SHIP WITH SET TO 2 Cvar_Get( "vm_ui", "2", CVAR_ARCHIVE ); // !@# SHIP WITH SET TO 2 +#endif Cmd_AddCommand ("vmprofile", VM_VmProfile_f ); Cmd_AddCommand ("vminfo", VM_VmInfo_f ); @@ -826,7 +832,7 @@ void VM_LogSyscalls( int *args ) { -#ifdef oDLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM +#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM int VM_CallCompiled( vm_t *vm, int *args ) { return(0); }