mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 03:56:10 +08:00
Initial changes for Left 4 Dead 2.
* Added/removed various functions from the following interfaces: IVEngineServer, IServerGameDLL, IServerGameClients, IFilesystem, and IConVar * Added new functions to ConVar for setting Color values * Updated SendProp structure with unknown member * Recompiled tier1 static library for Windows and Linux * Fixed up some tier0 exports in public/tier0/dbg.h * Rebuilt tier0 import libary for Windows * Replaced tier0_i486.so and vstdlib_i486.so with the newly renamed versions: tier0_linux.so and vstdlib_linux.so --HG-- rename : lib/linux/tier0_i486.so => lib/linux/tier0_linux.so rename : lib/linux/vstdlib_i486.so => lib/linux/vstdlib_linux.so
This commit is contained in:
Binary file not shown.
BIN
lib/linux/tier0_linux.so
Normal file
BIN
lib/linux/tier0_linux.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/linux/vstdlib_linux.so
Normal file
BIN
lib/linux/vstdlib_linux.so
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,8 +2,8 @@
|
|||||||
* About *
|
* About *
|
||||||
*********
|
*********
|
||||||
This version of the Source SDK is meant only for compiling server plugins for
|
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.
|
available.
|
||||||
|
|
||||||
This is a modified version of the Orange Box SDK. Changes to it were reverse
|
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.
|
||||||
|
@ -266,6 +266,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
unsigned char m_Unknown2;
|
||||||
|
|
||||||
int m_Flags; // SPROP_ flags.
|
int m_Flags; // SPROP_ flags.
|
||||||
|
|
||||||
SendVarProxyFn m_ProxyFn; // NULL for DPT_DataTable.
|
SendVarProxyFn m_ProxyFn; // NULL for DPT_DataTable.
|
||||||
|
@ -90,6 +90,8 @@ public:
|
|||||||
|
|
||||||
// Is in Hammer editing mode?
|
// Is in Hammer editing mode?
|
||||||
virtual int IsInEditMode( void ) = 0;
|
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
|
// Add to the server/client lookup/precache table, the specified string is given a unique index
|
||||||
// NOTE: The indices for PrecacheModel are 1 based
|
// 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;
|
virtual void SetView( const edict_t *pClient, const edict_t *pViewent ) = 0;
|
||||||
|
|
||||||
// Get a high precision timer for doing profiling work
|
// 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
|
// Set the player's crosshair angle
|
||||||
virtual void CrosshairAngle( const edict_t *pClient, float pitch, float yaw ) = 0;
|
virtual void CrosshairAngle( const edict_t *pClient, float pitch, float yaw ) = 0;
|
||||||
@ -295,7 +297,9 @@ public:
|
|||||||
virtual const CBitVec<MAX_EDICTS>* GetEntityTransmitBitsForClient( int iClientIndex ) = 0;
|
virtual const CBitVec<MAX_EDICTS>* GetEntityTransmitBitsForClient( int iClientIndex ) = 0;
|
||||||
|
|
||||||
// Is the game paused?
|
// 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.
|
// Marks the filename for consistency checking. This should be called after precaching the file.
|
||||||
virtual void ForceExactFile( const char *s ) = 0;
|
virtual void ForceExactFile( const char *s ) = 0;
|
||||||
@ -344,10 +348,6 @@ public:
|
|||||||
virtual int GetLightForPointListenServerOnly(const Vector &, bool, Vector *) = 0;
|
virtual int GetLightForPointListenServerOnly(const Vector &, bool, Vector *) = 0;
|
||||||
virtual int TraceLightingListenServerOnly(const Vector &, const Vector &, Vector *, 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
|
// Cleans up the cluster list
|
||||||
virtual void CleanUpEntityClusterList( PVSInfo_t *pPVSInfo ) = 0;
|
virtual void CleanUpEntityClusterList( PVSInfo_t *pPVSInfo ) = 0;
|
||||||
|
|
||||||
@ -376,6 +376,10 @@ public:
|
|||||||
// Returns true if this client has been fully authenticated by Steam
|
// Returns true if this client has been fully authenticated by Steam
|
||||||
virtual bool IsClientFullyAuthenticated( edict_t *pEdict ) = 0;
|
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 bool IsSplitScreenPlayer( int ) = 0;
|
||||||
virtual int GetSplitScreenPlayerAttachToEdict( int ) = 0;
|
virtual int GetSplitScreenPlayerAttachToEdict( int ) = 0;
|
||||||
virtual int GetNumSplitScreenUsersAttachedToEdict( int ) = 0;
|
virtual int GetNumSplitScreenUsersAttachedToEdict( int ) = 0;
|
||||||
@ -396,12 +400,21 @@ public:
|
|||||||
|
|
||||||
virtual void Pause( bool, bool ) = 0;
|
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
|
// 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 void SetGamestatsData( CGamestatsData *pGamestatsData ) = 0;
|
||||||
virtual CGamestatsData *GetGamestatsData() = 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 HostValidateSession() = 0;
|
||||||
virtual void RefreshScreenIfNecessary() = 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"
|
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_4 "ServerGameDLL004"
|
||||||
@ -474,6 +487,7 @@ public:
|
|||||||
virtual void ReadRestoreHeaders( CSaveRestoreData * ) = 0;
|
virtual void ReadRestoreHeaders( CSaveRestoreData * ) = 0;
|
||||||
virtual void Restore( CSaveRestoreData *, bool ) = 0;
|
virtual void Restore( CSaveRestoreData *, bool ) = 0;
|
||||||
virtual bool IsRestoring() = 0;
|
virtual bool IsRestoring() = 0;
|
||||||
|
virtual bool SupportsSaveRestore() = 0;
|
||||||
|
|
||||||
// Returns the number of entities moved across the transition
|
// Returns the number of entities moved across the transition
|
||||||
virtual int CreateEntityTransitionList( CSaveRestoreData *, int ) = 0;
|
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 OnQueryCvarValueFinished( QueryCvarCookie_t iCookie, edict_t *pPlayerEntity, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue ) = 0;
|
||||||
|
|
||||||
virtual void PostToolsInit( void ) = 0;
|
virtual void PostToolsInit( void ) = 0;
|
||||||
virtual void ApplyGameSettings( KeyValues * ) = 0;
|
virtual void ApplyGameSettings( KeyValues * ) = 0;
|
||||||
virtual const char * GetGameModeConfigFile( int ) = 0;
|
virtual void GetMatchmakingTags( char *, unsigned int ) = 0;
|
||||||
virtual int GameGameModePlayerSlots( int ) = 0;
|
virtual void ServerHibernationUpdate( bool ) = 0;
|
||||||
virtual void GetMatchmakingTags( char *, unsigned int ) = 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 GetMaxSplitscreenPlayers( void ) = 0;
|
||||||
|
|
||||||
virtual int GetMaxHumanPlayers( void ) = 0;
|
virtual int GetMaxHumanPlayers( void ) = 0;
|
||||||
|
|
||||||
|
virtual void ClientCommandKeyValues( edict_t *pEdict, KeyValues * ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define INTERFACEVERSION_UPLOADGAMESTATS "ServerUploadGameStats001"
|
#define INTERFACEVERSION_UPLOADGAMESTATS "ServerUploadGameStats001"
|
||||||
|
@ -640,13 +640,10 @@ public:
|
|||||||
NUM_PRELOAD_TYPES
|
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.
|
// 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
|
// 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 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 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 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;
|
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 FSDirtyDiskReportFunc_t GetDirtyDiskReportFunc( void ) = 0;
|
||||||
|
|
||||||
virtual int AddVPKFile( const char *file ) = 0;
|
virtual int AddVPKFile( const char *file, SearchPathAdd_t ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@ -188,13 +188,11 @@ public:
|
|||||||
virtual void SetupPreloadData() {}
|
virtual void SetupPreloadData() {}
|
||||||
virtual void DiscardPreloadData() {}
|
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.
|
// 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
|
// 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 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 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 ); }
|
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 void GetSearchPathID( char *a, int b ) { m_pFileSystemPassThru->GetSearchPathID(a, b); }
|
||||||
virtual bool FixupSearchPathsAfterInstall() { return m_pFileSystemPassThru->FixupSearchPathsAfterInstall(); }
|
virtual bool FixupSearchPathsAfterInstall() { return m_pFileSystemPassThru->FixupSearchPathsAfterInstall(); }
|
||||||
virtual FSDirtyDiskReportFunc_t GetDirtyDiskReportFunc() { return m_pFileSystemPassThru->GetDirtyDiskReportFunc(); }
|
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:
|
protected:
|
||||||
IFileSystem *m_pFileSystemPassThru;
|
IFileSystem *m_pFileSystemPassThru;
|
||||||
|
@ -75,13 +75,13 @@ public:
|
|||||||
// Data access
|
// Data access
|
||||||
virtual bool GetBool( const char *keyName = NULL, bool defaultValue = false ) = 0;
|
virtual bool GetBool( const char *keyName = NULL, bool defaultValue = false ) = 0;
|
||||||
virtual int GetInt( const char *keyName = NULL, int defaultValue = 0 ) = 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 float GetFloat( const char *keyName = NULL, float defaultValue = 0.0f ) = 0;
|
||||||
virtual const char *GetString( const char *keyName = NULL, const char *defaultValue = "" ) = 0;
|
virtual const char *GetString( const char *keyName = NULL, const char *defaultValue = "" ) = 0;
|
||||||
|
|
||||||
virtual void SetBool( const char *keyName, bool value ) = 0;
|
virtual void SetBool( const char *keyName, bool value ) = 0;
|
||||||
virtual void SetInt( const char *keyName, int 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 SetFloat( const char *keyName, float value ) = 0;
|
||||||
virtual void SetString( const char *keyName, const char *value ) = 0;
|
virtual void SetString( const char *keyName, const char *value ) = 0;
|
||||||
};
|
};
|
||||||
|
@ -69,11 +69,6 @@ public:
|
|||||||
p##name->m_pMessageHandler = this; \
|
p##name->m_pMessageHandler = this; \
|
||||||
chan->RegisterMessage( p##name ); \
|
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_Tick;
|
||||||
class NET_StringCmd;
|
class NET_StringCmd;
|
||||||
class NET_SetConVar;
|
class NET_SetConVar;
|
||||||
@ -101,6 +96,7 @@ class CLC_RespondCvarValue;
|
|||||||
class CLC_SplitPlayerConnect;
|
class CLC_SplitPlayerConnect;
|
||||||
class CLC_FileCRCCheck;
|
class CLC_FileCRCCheck;
|
||||||
class CLC_LoadingProgress;
|
class CLC_LoadingProgress;
|
||||||
|
class CLC_CmdKeyValues;
|
||||||
|
|
||||||
class IClientMessageHandler : public INetMessageHandler
|
class IClientMessageHandler : public INetMessageHandler
|
||||||
{
|
{
|
||||||
@ -116,6 +112,7 @@ public:
|
|||||||
PROCESS_CLC_MESSAGE( SplitPlayerConnect ) = 0;
|
PROCESS_CLC_MESSAGE( SplitPlayerConnect ) = 0;
|
||||||
PROCESS_CLC_MESSAGE( FileCRCCheck ) = 0;
|
PROCESS_CLC_MESSAGE( FileCRCCheck ) = 0;
|
||||||
PROCESS_CLC_MESSAGE( LoadingProgress ) = 0;
|
PROCESS_CLC_MESSAGE( LoadingProgress ) = 0;
|
||||||
|
PROCESS_CLC_MESSAGE( CmdKeyValues ) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SVC_Print;
|
class SVC_Print;
|
||||||
@ -142,6 +139,7 @@ class SVC_Menu;
|
|||||||
class SVC_GameEventList;
|
class SVC_GameEventList;
|
||||||
class SVC_GetCvarValue;
|
class SVC_GetCvarValue;
|
||||||
class SVC_SplitScreen;
|
class SVC_SplitScreen;
|
||||||
|
class SVC_CmdKeyValues;
|
||||||
|
|
||||||
class IServerMessageHandler : public INetMessageHandler
|
class IServerMessageHandler : public INetMessageHandler
|
||||||
{
|
{
|
||||||
@ -172,34 +170,7 @@ public:
|
|||||||
PROCESS_SVC_MESSAGE( GameEventList ) = 0;
|
PROCESS_SVC_MESSAGE( GameEventList ) = 0;
|
||||||
PROCESS_SVC_MESSAGE( GetCvarValue ) = 0;
|
PROCESS_SVC_MESSAGE( GetCvarValue ) = 0;
|
||||||
PROCESS_SVC_MESSAGE( SplitScreen ) = 0;
|
PROCESS_SVC_MESSAGE( SplitScreen ) = 0;
|
||||||
};
|
PROCESS_SVC_MESSAGE( CmdKeyValues ) = 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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class IConnectionlessPacketHandler
|
class IConnectionlessPacketHandler
|
||||||
|
@ -175,6 +175,7 @@ enum SpewRetval_t
|
|||||||
SPEW_ABORT
|
SPEW_ABORT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* type of externally defined function used to display debug spew */
|
/* type of externally defined function used to display debug spew */
|
||||||
typedef SpewRetval_t (*SpewOutputFunc_t)( SpewType_t spewType, const tchar *pMsg );
|
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 _SpewMessage( const tchar* pMsg, ... );
|
||||||
DBG_INTERFACE SpewRetval_t _DSpewMessage( const tchar *pGroupName, int level, 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, ... );
|
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 void _ExitOnFatalAssert( const tchar* pFile, int line );
|
||||||
DBG_INTERFACE bool ShouldUseNewAssertDialog();
|
DBG_INTERFACE bool ShouldUseNewAssertDialog();
|
||||||
|
|
||||||
@ -212,10 +216,9 @@ DBG_INTERFACE bool DoNewAssertDialog( const tchar *pFile, int line, const tchar
|
|||||||
do { \
|
do { \
|
||||||
if (!(_exp)) \
|
if (!(_exp)) \
|
||||||
{ \
|
{ \
|
||||||
_SpewInfo( SPEW_ASSERT, __TFILE__, __LINE__ ); \
|
int ret = LoggingSystem_LogAssert("%s", _msg); \
|
||||||
SpewRetval_t ret = _SpewMessage("%s", _msg); \
|
|
||||||
_executeExp; \
|
_executeExp; \
|
||||||
if ( ret == SPEW_DEBUGGER) \
|
if ( ret ) \
|
||||||
{ \
|
{ \
|
||||||
if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( __TFILE__, __LINE__, _msg ) ) \
|
if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( __TFILE__, __LINE__, _msg ) ) \
|
||||||
DebuggerBreak(); \
|
DebuggerBreak(); \
|
||||||
@ -231,7 +234,7 @@ DBG_INTERFACE bool DoNewAssertDialog( const tchar *pFile, int line, const tchar
|
|||||||
if (!fAsserted ) \
|
if (!fAsserted ) \
|
||||||
{ \
|
{ \
|
||||||
_AssertMsg( _exp, _msg, (fAsserted = true), _bFatal ); \
|
_AssertMsg( _exp, _msg, (fAsserted = true), _bFatal ); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* Spew macros... */
|
/* Spew macros... */
|
||||||
@ -345,24 +348,13 @@ DBG_INTERFACE bool DoNewAssertDialog( const tchar *pFile, int line, const tchar
|
|||||||
|
|
||||||
/* These are always compiled in */
|
/* These are always compiled in */
|
||||||
DBG_INTERFACE void Msg( const tchar* pMsg, ... );
|
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 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, ... );
|
DBG_INTERFACE void Error( const tchar *pMsg, ... );
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
inline void Msg( ... ) {}
|
inline void Msg( ... ) {}
|
||||||
inline void DMsg( ... ) {}
|
|
||||||
inline void Warning( const tchar *pMsg, ... ) {}
|
inline void Warning( const tchar *pMsg, ... ) {}
|
||||||
inline void DWarning( ... ) {}
|
|
||||||
inline void Log( ... ) {}
|
|
||||||
inline void DLog( ... ) {}
|
|
||||||
inline void Error( ... ) {}
|
inline void Error( ... ) {}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -386,48 +378,25 @@ inline void Error( ... ) {}
|
|||||||
/* These looked at the "developer" group */
|
/* These looked at the "developer" group */
|
||||||
DBG_INTERFACE void DevMsg( int level, const tchar* pMsg, ... );
|
DBG_INTERFACE void DevMsg( int level, const tchar* pMsg, ... );
|
||||||
DBG_INTERFACE void DevWarning( 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) */
|
/* default level versions (level 1) */
|
||||||
DBG_OVERLOAD void DevMsg( const tchar* pMsg, ... );
|
DBG_OVERLOAD void DevMsg( const tchar* pMsg, ... );
|
||||||
DBG_OVERLOAD void DevWarning( 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) */
|
/* default console version (level 1) */
|
||||||
DBG_OVERLOAD void ConColorMsg( const Color& clr, const tchar* pMsg, ... );
|
DBG_OVERLOAD void ConColorMsg( const Color& clr, const tchar* pMsg, ... );
|
||||||
DBG_OVERLOAD void ConMsg( 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) */
|
/* 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 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
|
#else
|
||||||
|
|
||||||
inline void DevMsg( ... ) {}
|
inline void DevMsg( ... ) {}
|
||||||
inline void DevWarning( ... ) {}
|
inline void DevWarning( ... ) {}
|
||||||
inline void DevLog( ... ) {}
|
inline void ConColorMsg( ... ) {}
|
||||||
inline void ConMsg( ... ) {}
|
inline void ConMsg( ... ) {}
|
||||||
inline void ConLog( ... ) {}
|
inline void ConDMsg( ... ) {}
|
||||||
inline void NetMsg( ... ) {}
|
|
||||||
inline void NetWarning( ... ) {}
|
|
||||||
inline void NetLog( ... ) {}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "tier1/utlvector.h"
|
#include "tier1/utlvector.h"
|
||||||
#include "tier1/utlstring.h"
|
#include "tier1/utlstring.h"
|
||||||
#include "icvar.h"
|
#include "icvar.h"
|
||||||
|
#include "Color.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define FORCEINLINE_CVAR FORCEINLINE
|
#define FORCEINLINE_CVAR FORCEINLINE
|
||||||
@ -362,6 +363,7 @@ public:
|
|||||||
FORCEINLINE_CVAR int GetInt( void ) const;
|
FORCEINLINE_CVAR int GetInt( void ) const;
|
||||||
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
|
FORCEINLINE_CVAR bool GetBool() const { return !!GetInt(); }
|
||||||
FORCEINLINE_CVAR char const *GetString( void ) const;
|
FORCEINLINE_CVAR char const *GetString( void ) const;
|
||||||
|
FORCEINLINE_CVAR Color GetColor ( void ) const;
|
||||||
|
|
||||||
// Used internally by OneTimeInit to initialize.
|
// Used internally by OneTimeInit to initialize.
|
||||||
virtual void Init();
|
virtual void Init();
|
||||||
@ -376,6 +378,7 @@ public:
|
|||||||
virtual void SetValue( const char *value );
|
virtual void SetValue( const char *value );
|
||||||
virtual void SetValue( float value );
|
virtual void SetValue( float value );
|
||||||
virtual void SetValue( int value );
|
virtual void SetValue( int value );
|
||||||
|
virtual void SetValue( Color value );
|
||||||
|
|
||||||
// Reset to default value
|
// Reset to default value
|
||||||
void Revert( void );
|
void Revert( void );
|
||||||
@ -391,6 +394,7 @@ private:
|
|||||||
// For CVARs marked FCVAR_NEVER_AS_STRING
|
// For CVARs marked FCVAR_NEVER_AS_STRING
|
||||||
virtual void InternalSetFloatValue( float fNewValue );
|
virtual void InternalSetFloatValue( float fNewValue );
|
||||||
virtual void InternalSetIntValue( int nValue );
|
virtual void InternalSetIntValue( int nValue );
|
||||||
|
virtual void InternalSetColorValue( Color cValue );
|
||||||
|
|
||||||
virtual bool ClampValue( float& value );
|
virtual bool ClampValue( float& value );
|
||||||
virtual void ChangeStringValue( const char *tempVal, float flOldValue );
|
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 : "";
|
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)
|
// Used to read/write convars that already exist (replaces the FindVar method)
|
||||||
@ -481,11 +497,13 @@ public:
|
|||||||
int GetInt( void ) const;
|
int GetInt( void ) const;
|
||||||
bool GetBool() const { return !!GetInt(); }
|
bool GetBool() const { return !!GetInt(); }
|
||||||
const char *GetString( void ) const;
|
const char *GetString( void ) const;
|
||||||
|
Color GetColor( void ) const;
|
||||||
|
|
||||||
void SetValue( const char *pValue );
|
void SetValue( const char *pValue );
|
||||||
void SetValue( float flValue );
|
void SetValue( float flValue );
|
||||||
void SetValue( int nValue );
|
void SetValue( int nValue );
|
||||||
void SetValue( bool bValue );
|
void SetValue( bool bValue );
|
||||||
|
void SetValue( Color cValue );
|
||||||
|
|
||||||
const char *GetName() const;
|
const char *GetName() const;
|
||||||
|
|
||||||
@ -542,6 +560,16 @@ FORCEINLINE_CVAR const char *ConVarRef::GetString( void ) const
|
|||||||
return m_pConVarState->m_pszString;
|
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 )
|
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 );
|
m_pConVar->SetValue( bValue ? 1 : 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FORCEINLINE_CVAR void ConVarRef::SetValue( Color cValue )
|
||||||
|
{
|
||||||
|
m_pConVar->SetValue( cValue );
|
||||||
|
}
|
||||||
|
|
||||||
FORCEINLINE_CVAR const char *ConVarRef::GetDefault() const
|
FORCEINLINE_CVAR const char *ConVarRef::GetDefault() const
|
||||||
{
|
{
|
||||||
return m_pConVarState->m_pszDefaultValue;
|
return m_pConVarState->m_pszDefaultValue;
|
||||||
|
@ -101,6 +101,7 @@ public:
|
|||||||
virtual void SetValue( const char *pValue ) = 0;
|
virtual void SetValue( const char *pValue ) = 0;
|
||||||
virtual void SetValue( float flValue ) = 0;
|
virtual void SetValue( float flValue ) = 0;
|
||||||
virtual void SetValue( int nValue ) = 0;
|
virtual void SetValue( int nValue ) = 0;
|
||||||
|
virtual void SetValue( Color cValue ) = 0;
|
||||||
|
|
||||||
// Return name of command
|
// Return name of command
|
||||||
virtual const char *GetName( void ) const = 0;
|
virtual const char *GetName( void ) const = 0;
|
||||||
|
@ -251,10 +251,9 @@ protected:
|
|||||||
do { \
|
do { \
|
||||||
if (!(_exp)) \
|
if (!(_exp)) \
|
||||||
{ \
|
{ \
|
||||||
_SpewInfo( SPEW_ASSERT, __TFILE__, __LINE__ ); \
|
int ret = LoggingSystem_LogAssert("%s", _msg); \
|
||||||
SpewRetval_t ret = _SpewMessage(_msg); \
|
|
||||||
_executeExp; \
|
_executeExp; \
|
||||||
if ( ret == SPEW_DEBUGGER) \
|
if ( ret ) \
|
||||||
{ \
|
{ \
|
||||||
if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( __TFILE__, __LINE__, _msg ) ) \
|
if ( !ShouldUseNewAssertDialog() || DoNewAssertDialog( __TFILE__, __LINE__, _msg ) ) \
|
||||||
DebuggerBreak(); \
|
DebuggerBreak(); \
|
||||||
|
@ -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
|
// Purpose: Private creation
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -999,6 +1009,16 @@ void ConVar::SetValue( int value )
|
|||||||
var->InternalSetIntValue( 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
|
// Purpose: Reset to default value
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -1052,6 +1072,7 @@ public:
|
|||||||
virtual void SetValue( const char *pValue ) {}
|
virtual void SetValue( const char *pValue ) {}
|
||||||
virtual void SetValue( float flValue ) {}
|
virtual void SetValue( float flValue ) {}
|
||||||
virtual void SetValue( int nValue ) {}
|
virtual void SetValue( int nValue ) {}
|
||||||
|
virtual void SetValue( Color cValue ) {}
|
||||||
virtual const char *GetName( void ) const { return ""; }
|
virtual const char *GetName( void ) const { return ""; }
|
||||||
virtual bool IsFlagSet( int nFlags ) const { return false; }
|
virtual bool IsFlagSet( int nFlags ) const { return false; }
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user