char *CGVM_GetCvarString(const char *name)
{
cvar_t *cvar;
+ // fast path for common cvars
+ if (!strcmp(name, "sv_gravity"))
+ return sv_gravity.string;
cvar = Cvar_FindVar((char *)name);
if (cvar)
return cvar->string;
float CGVM_GetCvarFloat(const char *name)
{
cvar_t *cvar;
+ // fast path for common cvars
+ if (!strcmp(name, "sv_gravity"))
+ return sv_gravity.value;
cvar = Cvar_FindVar((char *)name);
if (cvar)
return cvar->value;
int CGVM_GetCvarInt(const char *name)
{
cvar_t *cvar;
+ // fast path for common cvars
+ if (!strcmp(name, "sv_gravity"))
+ return sv_gravity.integer;
cvar = Cvar_FindVar((char *)name);
if (cvar)
return cvar->integer;