| 282 | */ |
| 283 | |
| 284 | ID_INLINE void idCVar::Init( const char *name, const char *value, int flags, const char *description, |
| 285 | float valueMin, float valueMax, const char **valueStrings, argCompletion_t valueCompletion ) { |
| 286 | this->name = name; |
| 287 | this->value = value; |
| 288 | this->flags = flags; |
| 289 | this->description = description; |
| 290 | this->flags = flags | CVAR_STATIC; |
| 291 | this->valueMin = valueMin; |
| 292 | this->valueMax = valueMax; |
| 293 | this->valueStrings = valueStrings; |
| 294 | this->valueCompletion = valueCompletion; |
| 295 | this->integerValue = 0; |
| 296 | this->floatValue = 0.0f; |
| 297 | this->internalVar = this; |
| 298 | if ( staticVars != staticCVarsInvalid ) { |
| 299 | this->next = staticVars; |
| 300 | staticVars = this; |
| 301 | } else { |
| 302 | cvarSystem->Register( this ); |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | ID_INLINE void idCVar::RegisterStaticVars( void ) { |
| 307 | if ( staticVars != staticCVarsInvalid ) { |