mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-12 06:28:00 +08:00
Correct CConVar constructors
This commit is contained in:
1 parent
71efa4b6bd
commit
b251eb32d8
1 file changed
-21
@@ -1281,27 +1281,6 @@ public:
|
||||
BaseClass::Register( name, flags, help_string, value_info );
|
||||
}
|
||||
|
||||
CConVar( const char *name, uint64 flags, const char *help_string, const T &default_value, bool min, const T &minValue, bool max, const T &maxValue, FnTypedChangeCallback_t<T> cb = nullptr )
|
||||
: BaseClass()
|
||||
{
|
||||
Assert( name );
|
||||
|
||||
BaseClass::Init( ConVarRef(), TranslateConVarType<T>() );
|
||||
|
||||
ConVarValueInfo_t value_info( TranslateConVarType<T>() );
|
||||
value_info.SetDefaultValue( default_value );
|
||||
|
||||
if(min)
|
||||
value_info.SetMinValue( minValue );
|
||||
|
||||
if(max)
|
||||
value_info.SetMaxValue( maxValue );
|
||||
|
||||
value_info.SetCallback( cb );
|
||||
|
||||
BaseClass::Register( name, flags, help_string, value_info );
|
||||
}
|
||||
|
||||
CConVar( const char *name, uint64 flags, const char *help_string, const T &default_value, bool min, const T &minValue, bool max, const T &maxValue, FnTypedChangeCallback_t<T> cb = nullptr, FnTypedFilterCallback_t<T> filter_cb = nullptr )
|
||||
: BaseClass()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user