mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-26 13:51:01 +00:00
Client: Add a check if the client is being ran in a web browser.
Will allow for certain features to be hidden/displayed specified to the web client.
This commit is contained in:
parent
836b7c47d7
commit
753fc61a53
2 changed files with 8 additions and 0 deletions
|
@ -196,6 +196,8 @@ float screen_height_169[MAX_169];
|
||||||
float screen_width_219[MAX_219];
|
float screen_width_219[MAX_219];
|
||||||
float screen_height_219[MAX_219];
|
float screen_height_219[MAX_219];
|
||||||
|
|
||||||
|
int platform_is_web;
|
||||||
|
|
||||||
//controller buttons
|
//controller buttons
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -71,6 +71,12 @@ noref void(float apiver, string enginename, float enginever) CSQC_Init =
|
||||||
|
|
||||||
cvar_set("sv_cheats", ftos(1));
|
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");
|
//print("CSQC Started\n");
|
||||||
dummy = spawn();
|
dummy = spawn();
|
||||||
if(serverkey("constate") == "disconnected")
|
if(serverkey("constate") == "disconnected")
|
||||||
|
|
Loading…
Reference in a new issue