]> git.xonotic.org Git - xonotic/xonotic.wiki.git/commitdiff
Added sv_ cvars explanation and a bit of organization in the "CSQC, MENUQC, SVQC...
authorLegendaryGuard <rootuser999@gmail.com>
Sun, 14 Feb 2021 17:53:20 +0000 (17:53 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Sun, 14 Feb 2021 17:53:20 +0000 (17:53 +0000)
Programming-QuakeC-stuff-in-Xonotic.md

index 7baf0c6124427285f8d67e2be70e61d831096076..8069282502687dab98c9c336f267dc8915e79e78 100644 (file)
@@ -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.
 
 
 <br />