diff --git a/lib/linux/tier0_i486.so b/lib/linux/tier0_i486.so deleted file mode 100644 index 714a8276..00000000 Binary files a/lib/linux/tier0_i486.so and /dev/null differ diff --git a/lib/linux/tier0_linux.so b/lib/linux/tier0_linux.so new file mode 100644 index 00000000..0a084d92 Binary files /dev/null and b/lib/linux/tier0_linux.so differ diff --git a/lib/linux/tier1_i486.a b/lib/linux/tier1_i486.a index e44f6c35..b27f9184 100644 Binary files a/lib/linux/tier1_i486.a and b/lib/linux/tier1_i486.a differ diff --git a/lib/linux/vstdlib_i486.so b/lib/linux/vstdlib_i486.so deleted file mode 100644 index e40952e2..00000000 Binary files a/lib/linux/vstdlib_i486.so and /dev/null differ diff --git a/lib/linux/vstdlib_linux.so b/lib/linux/vstdlib_linux.so new file mode 100644 index 00000000..681ee199 Binary files /dev/null and b/lib/linux/vstdlib_linux.so differ diff --git a/lib/public/tier0.lib b/lib/public/tier0.lib index c9801912..7dc5bc29 100644 Binary files a/lib/public/tier0.lib and b/lib/public/tier0.lib differ diff --git a/lib/public/tier1.lib b/lib/public/tier1.lib index d382e0e7..8b761b8f 100644 Binary files a/lib/public/tier1.lib and b/lib/public/tier1.lib differ diff --git a/notes.txt b/notes.txt index 5d397b22..9c921a79 100644 --- a/notes.txt +++ b/notes.txt @@ -2,8 +2,8 @@ * About * ********* This version of the Source SDK is meant only for compiling server plugins for -the engine that runs Valve's Left 4 Dead game. An official SDK is not yet +the engine that runs Valve's Left 4 Dead 2 game. An official SDK is not yet available. This is a modified version of the Orange Box SDK. Changes to it were reverse -engineered from the Left 4 Dead engine and game binaries. +engineered from the Left 4 Dead 2 engine and game binaries. diff --git a/public/dt_send.h b/public/dt_send.h index 24c7fb2f..0e48ee97 100644 --- a/public/dt_send.h +++ b/public/dt_send.h @@ -266,6 +266,8 @@ public: private: + unsigned char m_Unknown2; + int m_Flags; // SPROP_ flags. SendVarProxyFn m_ProxyFn; // NULL for DPT_DataTable. diff --git a/public/eiface.h b/public/eiface.h index 14bfd817..69389959 100644 --- a/public/eiface.h +++ b/public/eiface.h @@ -90,6 +90,8 @@ public: // Is in Hammer editing mode? virtual int IsInEditMode( void ) = 0; + + virtual KeyValues *GetLaunchOptions( void ) = 0; // Add to the server/client lookup/precache table, the specified string is given a unique index // NOTE: The indices for PrecacheModel are 1 based @@ -202,7 +204,7 @@ public: virtual void SetView( const edict_t *pClient, const edict_t *pViewent ) = 0; // Get a high precision timer for doing profiling work - virtual float Time( void ) = 0; + virtual float OBSOLETE_Time( void ) = 0; // Set the player's crosshair angle virtual void CrosshairAngle( const edict_t *pClient, float pitch, float yaw ) = 0; @@ -295,7 +297,9 @@ public: virtual const CBitVec* GetEntityTransmitBitsForClient( int iClientIndex ) = 0; // Is the game paused? - virtual bool IsPaused() = 0; + virtual bool IsPaused( void ) = 0; + + virtual float GetTimescale( void ) const = 0; // Marks the filename for consistency checking. This should be called after precaching the file. virtual void ForceExactFile( const char *s ) = 0; @@ -344,10 +348,6 @@ public: virtual int GetLightForPointListenServerOnly(const Vector &, bool, Vector *) = 0; virtual int TraceLightingListenServerOnly(const Vector &, const Vector &, Vector *, Vector *) = 0; - // Matchmaking - virtual void MultiplayerEndGame() = 0; - virtual void ChangeTeam( const char *pTeamName ) = 0; - // Cleans up the cluster list virtual void CleanUpEntityClusterList( PVSInfo_t *pPVSInfo ) = 0; @@ -376,6 +376,10 @@ public: // Returns true if this client has been fully authenticated by Steam virtual bool IsClientFullyAuthenticated( edict_t *pEdict ) = 0; + // This makes the host run 1 tick per frame instead of checking the system timer to see how many ticks to run in a certain frame. + // i.e. it does the same thing timedemo does. + virtual void SetDedicatedServerBenchmarkMode( bool bBenchmarkMode ) = 0; + virtual bool IsSplitScreenPlayer( int ) = 0; virtual int GetSplitScreenPlayerAttachToEdict( int ) = 0; virtual int GetNumSplitScreenUsersAttachedToEdict( int ) = 0; @@ -396,12 +400,21 @@ public: virtual void Pause( bool, bool ) = 0; + virtual void SetTimescale( float ) = 0; + // Methods to set/get a gamestats data container so client & server running in same process can send combined data virtual void SetGamestatsData( CGamestatsData *pGamestatsData ) = 0; virtual CGamestatsData *GetGamestatsData() = 0; + + // Returns the SteamID of the specified player. It'll be NULL if the player hasn't authenticated yet. + virtual const CSteamID *GetClientSteamID( edict_t *pPlayerEdict ) = 0; virtual void HostValidateSession() = 0; virtual void RefreshScreenIfNecessary() = 0; + + virtual void *AllocLevelStaticDataName( unsigned int, const char * ) = 0; + virtual void ClientCommandKeyValues( edict_t *pEdict, KeyValues * ) = 0; + virtual int64 GetClientXUID( edict_t * ) = 0; }; #define INTERFACEVERSION_SERVERGAMEDLL_VERSION_4 "ServerGameDLL004" @@ -474,6 +487,7 @@ public: virtual void ReadRestoreHeaders( CSaveRestoreData * ) = 0; virtual void Restore( CSaveRestoreData *, bool ) = 0; virtual bool IsRestoring() = 0; + virtual bool SupportsSaveRestore() = 0; // Returns the number of entities moved across the transition virtual int CreateEntityTransitionList( CSaveRestoreData *, int ) = 0; @@ -511,10 +525,11 @@ public: virtual void OnQueryCvarValueFinished( QueryCvarCookie_t iCookie, edict_t *pPlayerEntity, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue ) = 0; virtual void PostToolsInit( void ) = 0; - virtual void ApplyGameSettings( KeyValues * ) = 0; - virtual const char * GetGameModeConfigFile( int ) = 0; - virtual int GameGameModePlayerSlots( int ) = 0; - virtual void GetMatchmakingTags( char *, unsigned int ) = 0; + virtual void ApplyGameSettings( KeyValues * ) = 0; + virtual void GetMatchmakingTags( char *, unsigned int ) = 0; + virtual void ServerHibernationUpdate( bool ) = 0; + virtual void GenerateLumpFileName( const char *, char *, int, int ) = 0; + virtual void *GetMatchmakingGameData( char *, unsigned int ) = 0; }; //----------------------------------------------------------------------------- @@ -618,6 +633,8 @@ public: virtual int GetMaxSplitscreenPlayers( void ) = 0; virtual int GetMaxHumanPlayers( void ) = 0; + + virtual void ClientCommandKeyValues( edict_t *pEdict, KeyValues * ) = 0; }; #define INTERFACEVERSION_UPLOADGAMESTATS "ServerUploadGameStats001" diff --git a/public/filesystem.h b/public/filesystem.h index 12ce2dc6..e11d8949 100644 --- a/public/filesystem.h +++ b/public/filesystem.h @@ -640,13 +640,10 @@ public: NUM_PRELOAD_TYPES }; - virtual void LoadCompiledKeyValues( KeyValuesPreloadType_t type, char const *archiveFile ) = 0; - // If the "PreloadedData" hasn't been purged, then this'll try and instance the KeyValues using the fast path of compiled keyvalues loaded during startup. // Otherwise, it'll just fall through to the regular KeyValues loading routines virtual KeyValues *LoadKeyValues( KeyValuesPreloadType_t type, char const *filename, char const *pPathID = 0 ) = 0; virtual bool LoadKeyValues( KeyValues& head, KeyValuesPreloadType_t type, char const *filename, char const *pPathID = 0 ) = 0; - virtual bool ExtractRootKeyName( KeyValuesPreloadType_t type, char *outbuf, size_t bufsize, char const *filename, char const *pPathID = 0 ) = 0; virtual FSAsyncStatus_t AsyncWrite(const char *pFileName, const void *pSrc, int nSrcBytes, bool bFreeMemory, bool bAppend = false, FSAsyncControl_t *pControl = NULL ) = 0; virtual FSAsyncStatus_t AsyncWriteFile(const char *pFileName, const CUtlBuffer *pSrc, int nSrcBytes, bool bFreeMemory, bool bAppend = false, FSAsyncControl_t *pControl = NULL ) = 0; @@ -746,7 +743,7 @@ public: virtual FSDirtyDiskReportFunc_t GetDirtyDiskReportFunc( void ) = 0; - virtual int AddVPKFile( const char *file ) = 0; + virtual int AddVPKFile( const char *file, SearchPathAdd_t ) = 0; }; //----------------------------------------------------------------------------- diff --git a/public/filesystem_passthru.h b/public/filesystem_passthru.h index 0885a790..a9612c77 100644 --- a/public/filesystem_passthru.h +++ b/public/filesystem_passthru.h @@ -188,13 +188,11 @@ public: virtual void SetupPreloadData() {} virtual void DiscardPreloadData() {} - virtual void LoadCompiledKeyValues( KeyValuesPreloadType_t type, char const *archiveFile ) { m_pFileSystemPassThru->LoadCompiledKeyValues( type, archiveFile ); } // If the "PreloadedData" hasn't been purged, then this'll try and instance the KeyValues using the fast path of compiled keyvalues loaded during startup. // Otherwise, it'll just fall through to the regular KeyValues loading routines virtual KeyValues *LoadKeyValues( KeyValuesPreloadType_t type, char const *filename, char const *pPathID = 0 ) { return m_pFileSystemPassThru->LoadKeyValues( type, filename, pPathID ); } virtual bool LoadKeyValues( KeyValues& head, KeyValuesPreloadType_t type, char const *filename, char const *pPathID = 0 ) { return m_pFileSystemPassThru->LoadKeyValues( head, type, filename, pPathID ); } - virtual bool ExtractRootKeyName( KeyValuesPreloadType_t type, char *outbuf, size_t bufsize, char const *filename, char const *pPathID = 0 ) { return m_pFileSystemPassThru->ExtractRootKeyName( type, outbuf, bufsize, filename, pPathID ); } virtual bool GetFileTypeForFullPath( char const *pFullPath, wchar_t *buf, size_t bufSizeInBytes ) { return m_pFileSystemPassThru->GetFileTypeForFullPath( pFullPath, buf, bufSizeInBytes ); } @@ -236,7 +234,7 @@ public: virtual void GetSearchPathID( char *a, int b ) { m_pFileSystemPassThru->GetSearchPathID(a, b); } virtual bool FixupSearchPathsAfterInstall() { return m_pFileSystemPassThru->FixupSearchPathsAfterInstall(); } virtual FSDirtyDiskReportFunc_t GetDirtyDiskReportFunc() { return m_pFileSystemPassThru->GetDirtyDiskReportFunc(); } - virtual int AddVPKFile( const char *file ) { return m_pFileSystemPassThru->AddVPKFile(file); } + virtual int AddVPKFile( const char *file, SearchPathAdd_t path ) { return m_pFileSystemPassThru->AddVPKFile(file, path); } protected: IFileSystem *m_pFileSystemPassThru; diff --git a/public/igameevents.h b/public/igameevents.h index a93a208f..477bf964 100644 --- a/public/igameevents.h +++ b/public/igameevents.h @@ -75,13 +75,13 @@ public: // Data access virtual bool GetBool( const char *keyName = NULL, bool defaultValue = false ) = 0; virtual int GetInt( const char *keyName = NULL, int defaultValue = 0 ) = 0; - virtual unsigned long long GetUint64 ( const char *keyName = NULL, unsigned long long defaultValue = 0) = 0; + virtual uint64 GetUint64 ( const char *keyName = NULL, unsigned long long defaultValue = 0) = 0; virtual float GetFloat( const char *keyName = NULL, float defaultValue = 0.0f ) = 0; virtual const char *GetString( const char *keyName = NULL, const char *defaultValue = "" ) = 0; virtual void SetBool( const char *keyName, bool value ) = 0; virtual void SetInt( const char *keyName, int value ) = 0; - virtual void SetUint64( const char *keyName, unsigned long long value ) = 0; + virtual void SetUint64( const char *keyName, uint64 value ) = 0; virtual void SetFloat( const char *keyName, float value ) = 0; virtual void SetString( const char *keyName, const char *value ) = 0; }; diff --git a/public/inetmsghandler.h b/public/inetmsghandler.h index 5a8a8a50..9bc56750 100644 --- a/public/inetmsghandler.h +++ b/public/inetmsghandler.h @@ -69,11 +69,6 @@ public: p##name->m_pMessageHandler = this; \ chan->RegisterMessage( p##name ); \ -#define REGISTER_MM_MSG( name ) \ - MM_##name * p##name = new MM_##name(); \ - p##name->m_pMessageHandler = this; \ - chan->RegisterMessage( p##name ); \ - class NET_Tick; class NET_StringCmd; class NET_SetConVar; @@ -101,6 +96,7 @@ class CLC_RespondCvarValue; class CLC_SplitPlayerConnect; class CLC_FileCRCCheck; class CLC_LoadingProgress; +class CLC_CmdKeyValues; class IClientMessageHandler : public INetMessageHandler { @@ -116,6 +112,7 @@ public: PROCESS_CLC_MESSAGE( SplitPlayerConnect ) = 0; PROCESS_CLC_MESSAGE( FileCRCCheck ) = 0; PROCESS_CLC_MESSAGE( LoadingProgress ) = 0; + PROCESS_CLC_MESSAGE( CmdKeyValues ) = 0; }; class SVC_Print; @@ -142,6 +139,7 @@ class SVC_Menu; class SVC_GameEventList; class SVC_GetCvarValue; class SVC_SplitScreen; +class SVC_CmdKeyValues; class IServerMessageHandler : public INetMessageHandler { @@ -172,34 +170,7 @@ public: PROCESS_SVC_MESSAGE( GameEventList ) = 0; PROCESS_SVC_MESSAGE( GetCvarValue ) = 0; PROCESS_SVC_MESSAGE( SplitScreen ) = 0; -}; - -class MM_Heartbeat; -class MM_ClientInfo; -class MM_ClientJoinRequest; -class MM_RegisterResponse; -class MM_Mutelist; -class MM_Checkpoint; -class MM_JoinResponse; -class MM_Migrate; -class MM_ClientChat; -class MM_ClientRequest; - -class IMatchmakingMessageHandler : public INetMessageHandler -{ -public: - virtual ~IMatchmakingMessageHandler( void ) {}; - - PROCESS_MM_MESSAGE( Heartbeat ) = 0; - PROCESS_MM_MESSAGE( ClientInfo ) = 0; - PROCESS_MM_MESSAGE( ClientJoinRequest ) = 0; - PROCESS_MM_MESSAGE( RegisterResponse ) = 0; - PROCESS_MM_MESSAGE( Mutelist ) = 0; - PROCESS_MM_MESSAGE( Checkpoint) = 0; - PROCESS_MM_MESSAGE( JoinResponse ) = 0; - PROCESS_MM_MESSAGE( Migrate ) = 0; - PROCESS_MM_MESSAGE( ClientChat ) = 0; - PROCESS_MM_MESSAGE( ClientRequest ) = 0; + PROCESS_SVC_MESSAGE( CmdKeyValues ) = 0; }; class IConnectionlessPacketHandler diff --git a/public/tier0/dbg.h b/public/tier0/dbg.h index dcbc6658..1b50cdb3 100644 --- a/public/tier0/dbg.h +++ b/public/tier0/dbg.h @@ -175,6 +175,7 @@ enum SpewRetval_t SPEW_ABORT }; +#if 0 /* type of externally defined function used to display debug spew */ typedef SpewRetval_t (*SpewOutputFunc_t)( SpewType_t spewType, const tchar *pMsg ); @@ -198,6 +199,9 @@ DBG_INTERFACE void _SpewInfo( SpewType_t type, const tchar* pFile, int line ); DBG_INTERFACE SpewRetval_t _SpewMessage( const tchar* pMsg, ... ); DBG_INTERFACE SpewRetval_t _DSpewMessage( const tchar *pGroupName, int level, const tchar* pMsg, ... ); DBG_INTERFACE SpewRetval_t ColorSpewMessage( SpewType_t type, const Color *pColor, const tchar* pMsg, ... ); +#endif + +DBG_INTERFACE int LoggingSystem_LogAssert( const tchar *pMsg, ... ); DBG_INTERFACE void _ExitOnFatalAssert( const tchar* pFile, int line ); DBG_INTERFACE bool ShouldUseNewAssertDialog(); @@ -212,10 +216,9 @@ DBG_INTERFACE bool DoNewAssertDialog( const tchar *pFile, int line, const tchar do { \ if (!(_exp)) \ { \ - _SpewInfo( SPEW_ASSERT, __TFILE__, __LINE__ ); \ - SpewRetval_t ret = _SpewMessage("%s", _msg); \ + int ret = LoggingSystem_LogAssert("%s", _msg); \ _executeExp; \ - if ( ret == SPEW_DEBUGGER) \ + if ( ret ) \ { \ if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( __TFILE__, __LINE__, _msg ) ) \ DebuggerBreak(); \ @@ -231,7 +234,7 @@ DBG_INTERFACE bool DoNewAssertDialog( const tchar *pFile, int line, const tchar if (!fAsserted ) \ { \ _AssertMsg( _exp, _msg, (fAsserted = true), _bFatal ); \ - } \ + } \ } while (0) /* Spew macros... */ @@ -345,24 +348,13 @@ DBG_INTERFACE bool DoNewAssertDialog( const tchar *pFile, int line, const tchar /* These are always compiled in */ DBG_INTERFACE void Msg( const tchar* pMsg, ... ); -DBG_INTERFACE void DMsg( const tchar *pGroupName, int level, const tchar *pMsg, ... ); - DBG_INTERFACE void Warning( const tchar *pMsg, ... ); -DBG_INTERFACE void DWarning( const tchar *pGroupName, int level, const tchar *pMsg, ... ); - -DBG_INTERFACE void Log( const tchar *pMsg, ... ); -DBG_INTERFACE void DLog( const tchar *pGroupName, int level, const tchar *pMsg, ... ); - DBG_INTERFACE void Error( const tchar *pMsg, ... ); #else inline void Msg( ... ) {} -inline void DMsg( ... ) {} inline void Warning( const tchar *pMsg, ... ) {} -inline void DWarning( ... ) {} -inline void Log( ... ) {} -inline void DLog( ... ) {} inline void Error( ... ) {} #endif @@ -386,48 +378,25 @@ inline void Error( ... ) {} /* These looked at the "developer" group */ DBG_INTERFACE void DevMsg( int level, const tchar* pMsg, ... ); DBG_INTERFACE void DevWarning( int level, const tchar *pMsg, ... ); -DBG_INTERFACE void DevLog( int level, const tchar *pMsg, ... ); /* default level versions (level 1) */ DBG_OVERLOAD void DevMsg( const tchar* pMsg, ... ); DBG_OVERLOAD void DevWarning( const tchar *pMsg, ... ); -DBG_OVERLOAD void DevLog( const tchar *pMsg, ... ); - -/* These looked at the "console" group */ -DBG_INTERFACE void ConColorMsg( int level, const Color& clr, const tchar* pMsg, ... ); -DBG_INTERFACE void ConMsg( int level, const tchar* pMsg, ... ); -DBG_INTERFACE void ConWarning( int level, const tchar *pMsg, ... ); -DBG_INTERFACE void ConLog( int level, const tchar *pMsg, ... ); /* default console version (level 1) */ DBG_OVERLOAD void ConColorMsg( const Color& clr, const tchar* pMsg, ... ); DBG_OVERLOAD void ConMsg( const tchar* pMsg, ... ); -DBG_OVERLOAD void ConWarning( const tchar *pMsg, ... ); -DBG_OVERLOAD void ConLog( const tchar *pMsg, ... ); /* developer console version (level 2) */ -DBG_INTERFACE void ConDColorMsg( const Color& clr, const tchar* pMsg, ... ); DBG_INTERFACE void ConDMsg( const tchar* pMsg, ... ); -DBG_INTERFACE void ConDWarning( const tchar *pMsg, ... ); -DBG_INTERFACE void ConDLog( const tchar *pMsg, ... ); - -/* These looked at the "network" group */ -DBG_INTERFACE void NetMsg( int level, const tchar* pMsg, ... ); -DBG_INTERFACE void NetWarning( int level, const tchar *pMsg, ... ); -DBG_INTERFACE void NetLog( int level, const tchar *pMsg, ... ); - -void ValidateSpew( class CValidator &validator ); #else inline void DevMsg( ... ) {} inline void DevWarning( ... ) {} -inline void DevLog( ... ) {} +inline void ConColorMsg( ... ) {} inline void ConMsg( ... ) {} -inline void ConLog( ... ) {} -inline void NetMsg( ... ) {} -inline void NetWarning( ... ) {} -inline void NetLog( ... ) {} +inline void ConDMsg( ... ) {} #endif diff --git a/public/tier1/convar.h b/public/tier1/convar.h index 34b10f91..b4347031 100644 --- a/public/tier1/convar.h +++ b/public/tier1/convar.h @@ -21,6 +21,7 @@ #include "tier1/utlvector.h" #include "tier1/utlstring.h" #include "icvar.h" +#include "Color.h" #ifdef _WIN32 #define FORCEINLINE_CVAR FORCEINLINE @@ -362,6 +363,7 @@ public: FORCEINLINE_CVAR int GetInt( void ) const; FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); } FORCEINLINE_CVAR char const *GetString( void ) const; + FORCEINLINE_CVAR Color GetColor ( void ) const; // Used internally by OneTimeInit to initialize. virtual void Init(); @@ -376,6 +378,7 @@ public: virtual void SetValue( const char *value ); virtual void SetValue( float value ); virtual void SetValue( int value ); + virtual void SetValue( Color value ); // Reset to default value void Revert( void ); @@ -391,6 +394,7 @@ private: // For CVARs marked FCVAR_NEVER_AS_STRING virtual void InternalSetFloatValue( float fNewValue ); virtual void InternalSetIntValue( int nValue ); + virtual void InternalSetColorValue( Color cValue ); virtual bool ClampValue( float& value ); virtual void ChangeStringValue( const char *tempVal, float flOldValue ); @@ -460,6 +464,18 @@ FORCEINLINE_CVAR const char *ConVar::GetString( void ) const return ( m_pParent->m_pszString ) ? m_pParent->m_pszString : ""; } +//----------------------------------------------------------------------------- +// Purpose: Return ConVar value as a Color +// Output : int +//----------------------------------------------------------------------------- +FORCEINLINE_CVAR Color ConVar::GetColor( void ) const +{ + Color color = Color(); + color.SetRawColor(m_pParent->m_nValue); + + return color; +} + //----------------------------------------------------------------------------- // Used to read/write convars that already exist (replaces the FindVar method) @@ -481,11 +497,13 @@ public: int GetInt( void ) const; bool GetBool() const { return !!GetInt(); } const char *GetString( void ) const; + Color GetColor( void ) const; void SetValue( const char *pValue ); void SetValue( float flValue ); void SetValue( int nValue ); void SetValue( bool bValue ); + void SetValue( Color cValue ); const char *GetName() const; @@ -542,6 +560,16 @@ FORCEINLINE_CVAR const char *ConVarRef::GetString( void ) const return m_pConVarState->m_pszString; } +//----------------------------------------------------------------------------- +// Purpose: Return ConVar value as a Color +//----------------------------------------------------------------------------- +FORCEINLINE_CVAR Color ConVarRef::GetColor( void ) const +{ + Color color = Color(); + color.SetRawColor(m_pConVarState->m_nValue); + + return color; +} FORCEINLINE_CVAR void ConVarRef::SetValue( const char *pValue ) { @@ -563,6 +591,11 @@ FORCEINLINE_CVAR void ConVarRef::SetValue( bool bValue ) m_pConVar->SetValue( bValue ? 1 : 0 ); } +FORCEINLINE_CVAR void ConVarRef::SetValue( Color cValue ) +{ + m_pConVar->SetValue( cValue ); +} + FORCEINLINE_CVAR const char *ConVarRef::GetDefault() const { return m_pConVarState->m_pszDefaultValue; diff --git a/public/tier1/iconvar.h b/public/tier1/iconvar.h index d673b027..ceea5f69 100644 --- a/public/tier1/iconvar.h +++ b/public/tier1/iconvar.h @@ -101,6 +101,7 @@ public: virtual void SetValue( const char *pValue ) = 0; virtual void SetValue( float flValue ) = 0; virtual void SetValue( int nValue ) = 0; + virtual void SetValue( Color cValue ) = 0; // Return name of command virtual const char *GetName( void ) const = 0; diff --git a/public/unitlib/unitlib.h b/public/unitlib/unitlib.h index d07c41a4..daee631d 100644 --- a/public/unitlib/unitlib.h +++ b/public/unitlib/unitlib.h @@ -251,10 +251,9 @@ protected: do { \ if (!(_exp)) \ { \ - _SpewInfo( SPEW_ASSERT, __TFILE__, __LINE__ ); \ - SpewRetval_t ret = _SpewMessage(_msg); \ + int ret = LoggingSystem_LogAssert("%s", _msg); \ _executeExp; \ - if ( ret == SPEW_DEBUGGER) \ + if ( ret ) \ { \ if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( __TFILE__, __LINE__, _msg ) ) \ DebuggerBreak(); \ diff --git a/tier1/convar.cpp b/tier1/convar.cpp index 3a1b6696..17dd3fbb 100644 --- a/tier1/convar.cpp +++ b/tier1/convar.cpp @@ -925,6 +925,16 @@ void ConVar::InternalSetIntValue( int nValue ) } } +//----------------------------------------------------------------------------- +// Purpose: +// Input : *value - +//----------------------------------------------------------------------------- +void ConVar::InternalSetColorValue( Color cValue ) +{ + int color = cValue.GetRawColor(); + InternalSetIntValue( color ); +} + //----------------------------------------------------------------------------- // Purpose: Private creation //----------------------------------------------------------------------------- @@ -999,6 +1009,16 @@ void ConVar::SetValue( int value ) var->InternalSetIntValue( value ); } +//----------------------------------------------------------------------------- +// Purpose: +// Input : value - +//----------------------------------------------------------------------------- +void ConVar::SetValue( Color value ) +{ + ConVar *var = ( ConVar * )m_pParent; + var->InternalSetColorValue( value ); +} + //----------------------------------------------------------------------------- // Purpose: Reset to default value //----------------------------------------------------------------------------- @@ -1052,6 +1072,7 @@ public: virtual void SetValue( const char *pValue ) {} virtual void SetValue( float flValue ) {} virtual void SetValue( int nValue ) {} + virtual void SetValue( Color cValue ) {} virtual const char *GetName( void ) const { return ""; } virtual bool IsFlagSet( int nFlags ) const { return false; } };