Updated the SDK with the latest code from the TF and HL2 branches.
This commit is contained in:
+8
-11
@@ -116,7 +116,7 @@ ConCommandBase::ConCommandBase( void )
|
||||
//-----------------------------------------------------------------------------
|
||||
ConCommandBase::ConCommandBase( const char *pName, const char *pHelpString /*=0*/, int flags /*= 0*/ )
|
||||
{
|
||||
Create( pName, pHelpString, flags );
|
||||
CreateBase( pName, pHelpString, flags );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -153,16 +153,14 @@ CVarDLLIdentifier_t ConCommandBase::GetDLLIdentifier() const
|
||||
// *pHelpString -
|
||||
// flags -
|
||||
//-----------------------------------------------------------------------------
|
||||
void ConCommandBase::Create( const char *pName, const char *pHelpString /*= 0*/, int flags /*= 0*/ )
|
||||
void ConCommandBase::CreateBase( const char *pName, const char *pHelpString /*= 0*/, int flags /*= 0*/ )
|
||||
{
|
||||
static char *empty_string = "";
|
||||
|
||||
m_bRegistered = false;
|
||||
|
||||
// Name should be static data
|
||||
Assert( pName );
|
||||
m_pszName = pName;
|
||||
m_pszHelpString = pHelpString ? pHelpString : empty_string;
|
||||
m_pszHelpString = pHelpString ? pHelpString : "";
|
||||
|
||||
m_nFlags = flags;
|
||||
|
||||
@@ -517,7 +515,7 @@ ConCommand::ConCommand( const char *pName, FnCommandCallbackVoid_t callback, con
|
||||
m_bHasCompletionCallback = completionFunc != 0 ? true : false;
|
||||
|
||||
// Setup the rest
|
||||
BaseClass::Create( pName, pHelpString, flags );
|
||||
BaseClass::CreateBase( pName, pHelpString, flags );
|
||||
}
|
||||
|
||||
ConCommand::ConCommand( const char *pName, FnCommandCallback_t callback, const char *pHelpString /*= 0*/, int flags /*= 0*/, FnCommandCompletionCallback completionFunc /*= 0*/ )
|
||||
@@ -530,7 +528,7 @@ ConCommand::ConCommand( const char *pName, FnCommandCallback_t callback, const c
|
||||
m_bUsingCommandCallbackInterface = false;
|
||||
|
||||
// Setup the rest
|
||||
BaseClass::Create( pName, pHelpString, flags );
|
||||
BaseClass::CreateBase( pName, pHelpString, flags );
|
||||
}
|
||||
|
||||
ConCommand::ConCommand( const char *pName, ICommandCallback *pCallback, const char *pHelpString /*= 0*/, int flags /*= 0*/, ICommandCompletionCallback *pCompletionCallback /*= 0*/ )
|
||||
@@ -543,7 +541,7 @@ ConCommand::ConCommand( const char *pName, ICommandCallback *pCallback, const ch
|
||||
m_bUsingCommandCallbackInterface = true;
|
||||
|
||||
// Setup the rest
|
||||
BaseClass::Create( pName, pHelpString, flags );
|
||||
BaseClass::CreateBase( pName, pHelpString, flags );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -976,7 +974,7 @@ void ConVar::Create( const char *pName, const char *pDefaultValue, int flags /*=
|
||||
Assert( 0 );
|
||||
}
|
||||
|
||||
BaseClass::Create( pName, pHelpString, flags );
|
||||
BaseClass::CreateBase( pName, pHelpString, flags );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1051,8 +1049,7 @@ const char *ConVar::GetDefault( void ) const
|
||||
|
||||
void ConVar::SetDefault( const char *pszDefault )
|
||||
{
|
||||
static char *empty_string = "";
|
||||
m_pszDefaultValue = pszDefault ? pszDefault : empty_string;
|
||||
m_pszDefaultValue = pszDefault ? pszDefault : "";
|
||||
Assert( m_pszDefaultValue );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user