mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Sync with upstream (Issue #30).
Recompiled tier1 and mathlib for all platforms will come in next commit.
This commit is contained in:
@ -592,7 +592,7 @@ void ConCommand::Dispatch( const CCommand &command )
|
||||
}
|
||||
|
||||
// Command without callback!!!
|
||||
AssertMsg( 0, ( "Encountered ConCommand '%s' without a callback!\n", GetName() ) );
|
||||
AssertMsg( 0, "Encountered ConCommand '%s' without a callback!\n", GetName() );
|
||||
}
|
||||
|
||||
|
||||
@ -777,10 +777,10 @@ void ConVar::InternalSetValue( const char *value )
|
||||
Q_snprintf( tempVal,sizeof(tempVal), "%f", fNewValue );
|
||||
val = tempVal;
|
||||
}
|
||||
|
||||
|
||||
// Redetermine value
|
||||
m_fValue = fNewValue;
|
||||
m_nValue = ( int )( m_fValue );
|
||||
m_nValue = ( int )( fNewValue );
|
||||
|
||||
if ( !( m_nFlags & FCVAR_NEVER_AS_STRING ) )
|
||||
{
|
||||
@ -821,13 +821,17 @@ void ConVar::ChangeStringValue( const char *tempVal, float flOldValue )
|
||||
*m_pszString = 0;
|
||||
}
|
||||
|
||||
// Invoke any necessary callback function
|
||||
if ( m_fnChangeCallback )
|
||||
// If nothing has changed, don't do the callbacks.
|
||||
if (V_strcmp(pszOldValue, m_pszString) != 0)
|
||||
{
|
||||
m_fnChangeCallback( this, pszOldValue, flOldValue );
|
||||
}
|
||||
// Invoke any necessary callback function
|
||||
if ( m_fnChangeCallback )
|
||||
{
|
||||
m_fnChangeCallback( this, pszOldValue, flOldValue );
|
||||
}
|
||||
|
||||
g_pCVar->CallGlobalChangeCallbacks( this, pszOldValue, flOldValue );
|
||||
g_pCVar->CallGlobalChangeCallbacks( this, pszOldValue, flOldValue );
|
||||
}
|
||||
|
||||
stackfree( pszOldValue );
|
||||
}
|
||||
|
Reference in New Issue
Block a user