Put default value of player hull width in a cvar.

This commit is contained in:
Greyscale 2009-07-02 01:39:57 -07:00
parent 03d226ad59
commit 3f5c477e08
3 changed files with 7 additions and 1 deletions

View File

@ -507,6 +507,10 @@ zr_ambientsounds_volume "0.8"
// Default: "1" // Default: "1"
zr_antistick "1" zr_antistick "1"
// The default width of player models, don't touch if you don't know what you're doing. [Dependency: zr_antistick]
// Default: "32.0"
zr_antistick_default_width "32.0"
// File to store antistick model hull data. [Dependency: zr_antistick] // File to store antistick model hull data. [Dependency: zr_antistick]
// Default: "data/antistick.dat" // Default: "data/antistick.dat"
zr_antistick_file_path "data/antistick.dat" zr_antistick_file_path "data/antistick.dat"

View File

@ -37,7 +37,7 @@
/** /**
* Default player hull width. * Default player hull width.
*/ */
#define ANTISTICK_DEFAULT_HULL_WIDTH 32.0 #define ANTISTICK_DEFAULT_HULL_WIDTH GetConVarFloat(g_hCvarsList[CVAR_ANTISTICK_DEFAULT_WIDTH])
/** /**
* Handle to keyvalue structure where data is stored. * Handle to keyvalue structure where data is stored.

View File

@ -126,6 +126,7 @@ enum CvarsList
Handle:CVAR_AMBIENTSOUNDS_LENGTH, Handle:CVAR_AMBIENTSOUNDS_LENGTH,
Handle:CVAR_AMBIENTSOUNDS_VOLUME, Handle:CVAR_AMBIENTSOUNDS_VOLUME,
Handle:CVAR_ANTISTICK, Handle:CVAR_ANTISTICK,
Handle:CVAR_ANTISTICK_DEFAULT_WIDTH,
Handle:CVAR_ANTISTICK_FILE_PATH, Handle:CVAR_ANTISTICK_FILE_PATH,
Handle:CVAR_SPAWNPROTECT, Handle:CVAR_SPAWNPROTECT,
Handle:CVAR_SPAWNPROTECT_TIME, Handle:CVAR_SPAWNPROTECT_TIME,
@ -388,6 +389,7 @@ CvarsCreate()
// Anti-Stick (module) // Anti-Stick (module)
// =========================== // ===========================
g_hCvarsList[CVAR_ANTISTICK] = CreateConVar("zr_antistick", "1", "Automatically unstick players when stuck within each others' collision hull."); g_hCvarsList[CVAR_ANTISTICK] = CreateConVar("zr_antistick", "1", "Automatically unstick players when stuck within each others' collision hull.");
g_hCvarsList[CVAR_ANTISTICK_DEFAULT_WIDTH] = CreateConVar("zr_antistick_default_width", "32.0", "The default width of player models, don't touch if you don't know what you're doing. [Dependency: zr_antistick]");
g_hCvarsList[CVAR_ANTISTICK_FILE_PATH] = CreateConVar("zr_antistick_file_path", "data/antistick.dat", "File to store antistick model hull data. [Dependency: zr_antistick]"); g_hCvarsList[CVAR_ANTISTICK_FILE_PATH] = CreateConVar("zr_antistick_file_path", "data/antistick.dat", "File to store antistick model hull data. [Dependency: zr_antistick]");
// =========================== // ===========================