From 6b23f6512c6e2d4b3b82231a62e4f26b21a28131 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Sun, 14 Feb 2021 17:53:20 +0000 Subject: [PATCH] Added sv_ cvars explanation and a bit of organization in the "CSQC, MENUQC, SVQC and GAMEQC blocks" section --- Programming-QuakeC-stuff-in-Xonotic.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Programming-QuakeC-stuff-in-Xonotic.md b/Programming-QuakeC-stuff-in-Xonotic.md index 7baf0c6..8069282 100644 --- a/Programming-QuakeC-stuff-in-Xonotic.md +++ b/Programming-QuakeC-stuff-in-Xonotic.md @@ -16,9 +16,19 @@ Server program is ***progs.dat*** - Also, code inside a **`#ifdef GAMEQC`** block is part of both client (not menu) and server code. -Example: `g_balance_grapplehook_speed_fly` is clearly a server cvar (**g_*** cvars are server cvars), so you CAN'T declare it within a `#ifdef CSQC` block. This cvar should be declared inside a **`#ifdef SVQC`**. +### A bit of explanation about the use of each type of cvars -Other example: `cl_chatsound` is clearly a client cvar (**cl_*** cvars are client cvars), only can be declared in a **`#ifdef CSQC`** block. +- **g_*** cvars: + +Example: `g_balance_grapplehook_speed_fly` is clearly a server or game cvar (**g_*** cvars are server and game cvars), so you CAN'T declare it within a `#ifdef CSQC` block. This type of cvar only can be declared inside a **`#ifdef SVQC`** or **`#ifdef GAMEQC`** (if possible). + +- **sv_*** cvars: + +Example: `sv_campcheck` is clearly a server cvar (**sv_*** cvars are server cvars), this type of cvars only can be declared inside a **`#ifdef SVQC`**. + +- **cl_*** cvars: + +Example: `cl_chatsound` is clearly a client cvar (**cl_*** cvars are client cvars), only can be declared in a **`#ifdef CSQC`** block.
-- 2.39.2