From e6c0776d98d5a0a53279495d16cbfe54037f0ebe Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 10 Jun 2024 02:55:20 -0500 Subject: [PATCH] Allow web client to use unzipped QVMs Compile the QVMs and automatically uses them when not using --preload-file. --- Makefile | 1 - code/web/baseq3/ioq3-config.json | 5 ++++- code/web/ioquake3.html | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cdbef2ea..716500ea 100644 --- a/Makefile +++ b/Makefile @@ -1066,7 +1066,6 @@ ifeq ($(PLATFORM),emscripten) USE_RENDERER_DLOPEN=0 USE_OPENAL_DLOPEN=0 BUILD_GAME_SO=0 - BUILD_GAME_QVM=0 BUILD_RENDERER_OPENGL1=0 BUILD_SERVER=0 diff --git a/code/web/baseq3/ioq3-config.json b/code/web/baseq3/ioq3-config.json index b0cb1f16..1ee8cc01 100644 --- a/code/web/baseq3/ioq3-config.json +++ b/code/web/baseq3/ioq3-config.json @@ -8,6 +8,9 @@ {"src": "baseq3/pak5.pk3", "dst": "/baseq3"}, {"src": "baseq3/pak6.pk3", "dst": "/baseq3"}, {"src": "baseq3/pak7.pk3", "dst": "/baseq3"}, - {"src": "baseq3/pak8.pk3", "dst": "/baseq3"} + {"src": "baseq3/pak8.pk3", "dst": "/baseq3"}, + {"src": "baseq3/vm/cgame.qvm", "dst": "/baseq3/vm"}, + {"src": "baseq3/vm/qagame.qvm", "dst": "/baseq3/vm"}, + {"src": "baseq3/vm/ui.qvm", "dst": "/baseq3/vm"} ] } diff --git a/code/web/ioquake3.html b/code/web/ioquake3.html index 4aac449d..93923cd5 100644 --- a/code/web/ioquake3.html +++ b/code/web/ioquake3.html @@ -14,6 +14,7 @@ if (window.location.protocol === 'file:') throw new Error('Unfortunately browser const urlParams = new URLSearchParams(window.location.search); const basegame = urlParams.get('basegame') || 'baseq3'; let generatedArguments = ` + +set sv_pure 0 +set net_enabled 0 +set r_mode -2 +set fs_game ${basegame}