diff options
| author | Joe Ludwig <[email protected]> | 2014-05-15 13:59:18 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2014-05-15 13:59:18 -0700 |
| commit | 53e78c503e6e9c7d15e2eefc480755fe37dd7077 (patch) | |
| tree | c8cc106eb4c0a2b2b5d79f534f2facb0514f5f55 /mp/src/tier1/convar.cpp | |
| parent | Added many shader source files (diff) | |
| download | source-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.tar.xz source-sdk-2013-53e78c503e6e9c7d15e2eefc480755fe37dd7077.zip | |
General:
* Upgraded Steamworks SDK to v1.29
* Fixed mod compatibility problem with Multiplayer Base that was introduced in September.
* In Hammer, while using the Vertex Tool, pressing CTRL+B will snap selected vertices to the grid.
Virtual Reality:
* Mods that support virtual reality now need to have a line in gameinfo.txt that says “supportsvr 1”. This indicates to gameui and engine that certain UI should be enabled.
* VR-enabled mods will now start up in VR mode when launched from Steam’s VR mode.
Windows:
* Upgraded to Visual Studio 2013. If you need to build projects for VS 2010, add /2010 to your VPC command line.
OSX:
* Upgraded to XCode 5.
Diffstat (limited to 'mp/src/tier1/convar.cpp')
| -rw-r--r-- | mp/src/tier1/convar.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mp/src/tier1/convar.cpp b/mp/src/tier1/convar.cpp index 3cfff35d..c49a6efb 100644 --- a/mp/src/tier1/convar.cpp +++ b/mp/src/tier1/convar.cpp @@ -269,7 +269,7 @@ char *ConCommandBase::CopyString( const char *from ) int len; char *to; - len = strlen( from ); + len = V_strlen( from ); if ( len <= 0 ) { to = new char[1]; @@ -507,7 +507,7 @@ int DefaultCompletionFunc( const char *partial, char commands[ COMMAND_COMPLETIO // m_bIsNewConCommand = true; //} -ConCommand::ConCommand( const char *pName, FnCommandCallbackV1_t callback, const char *pHelpString /*= 0*/, int flags /*= 0*/, FnCommandCompletionCallback completionFunc /*= 0*/ ) +ConCommand::ConCommand( const char *pName, FnCommandCallbackVoid_t callback, const char *pHelpString /*= 0*/, int flags /*= 0*/, FnCommandCompletionCallback completionFunc /*= 0*/ ) { // Set the callback m_fnCommandCallbackV1 = callback; @@ -951,7 +951,7 @@ void ConVar::Create( const char *pName, const char *pDefaultValue, int flags /*= // Name should be static data SetDefault( pDefaultValue ); - m_StringLength = strlen( m_pszDefaultValue ) + 1; + m_StringLength = V_strlen( m_pszDefaultValue ) + 1; m_pszString = new char[m_StringLength]; memcpy( m_pszString, m_pszDefaultValue, m_StringLength ); @@ -963,6 +963,7 @@ void ConVar::Create( const char *pName, const char *pDefaultValue, int flags /*= m_fnChangeCallback = callback; m_fValue = ( float )atof( m_pszString ); + m_nValue = atoi( m_pszString ); // dont convert from float to int and lose bits // Bounds Check, should never happen, if it does, no big deal if ( m_bHasMin && ( m_fValue < m_fMinVal ) ) @@ -975,8 +976,6 @@ void ConVar::Create( const char *pName, const char *pDefaultValue, int flags /*= Assert( 0 ); } - m_nValue = ( int )m_fValue; - BaseClass::Create( pName, pHelpString, flags ); } |