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
|
@@ -3864,9 +3864,18 @@ function createCGameImport(imports, state) {
|
|
|
3864
3864
|
},
|
|
3865
3865
|
// Cvars
|
|
3866
3866
|
cvar: (name, value, flags) => {
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3867
|
+
if (!imports.host || !imports.host.cvars) {
|
|
3868
|
+
return null;
|
|
3869
|
+
}
|
|
3870
|
+
const existing = imports.host.cvars.get(name);
|
|
3871
|
+
if (existing) {
|
|
3872
|
+
return existing;
|
|
3873
|
+
}
|
|
3874
|
+
return imports.host.cvars.register({
|
|
3875
|
+
name,
|
|
3876
|
+
defaultValue: value,
|
|
3877
|
+
flags
|
|
3878
|
+
});
|
|
3870
3879
|
},
|
|
3871
3880
|
cvar_set: (name, value) => {
|
|
3872
3881
|
imports.host?.cvars?.setValue(name, value);
|