diff --git a/source/client/defs/custom.qc b/source/client/defs/custom.qc index 592bda3..3932ab9 100644 --- a/source/client/defs/custom.qc +++ b/source/client/defs/custom.qc @@ -196,6 +196,8 @@ float screen_height_169[MAX_169]; float screen_width_219[MAX_219]; float screen_height_219[MAX_219]; +int platform_is_web; + //controller buttons /* diff --git a/source/client/main.qc b/source/client/main.qc index 9ad56e8..8c82c27 100644 --- a/source/client/main.qc +++ b/source/client/main.qc @@ -70,6 +70,12 @@ noref void(float apiver, string enginename, float enginever) CSQC_Init = registercommand("showscores"); cvar_set("sv_cheats", ftos(1)); + + // Runtime check if we're running this in WebASM/WebGL. + if (cvar_string("sys_platform") == "Web") + platform_is_web = true; + else + platform_is_web = false; //print("CSQC Started\n"); dummy = spawn();