quake2ts 0.0.212 → 0.0.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/client/dist/browser/index.global.js +1 -1
- package/packages/client/dist/browser/index.global.js.map +1 -1
- package/packages/client/dist/cjs/index.cjs +12 -3
- package/packages/client/dist/cjs/index.cjs.map +1 -1
- package/packages/client/dist/esm/index.js +12 -3
- package/packages/client/dist/esm/index.js.map +1 -1
- package/packages/client/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/client/dist/types/cgameBridge.d.ts.map +1 -1
- package/packages/server/dist/index.cjs +165 -23
- package/packages/server/dist/index.js +158 -16
|
@@ -3895,9 +3895,18 @@ function createCGameImport(imports, state) {
|
|
|
3895
3895
|
},
|
|
3896
3896
|
// Cvars
|
|
3897
3897
|
cvar: (name, value, flags) => {
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3898
|
+
if (!imports.host || !imports.host.cvars) {
|
|
3899
|
+
return null;
|
|
3900
|
+
}
|
|
3901
|
+
const existing = imports.host.cvars.get(name);
|
|
3902
|
+
if (existing) {
|
|
3903
|
+
return existing;
|
|
3904
|
+
}
|
|
3905
|
+
return imports.host.cvars.register({
|
|
3906
|
+
name,
|
|
3907
|
+
defaultValue: value,
|
|
3908
|
+
flags
|
|
3909
|
+
});
|
|
3901
3910
|
},
|
|
3902
3911
|
cvar_set: (name, value) => {
|
|
3903
3912
|
imports.host?.cvars?.setValue(name, value);
|