Sync eiface.h from 2013 SDK.

This commit is contained in:
Nicholas Hastings 2014-10-30 18:57:31 -04:00
parent 5474d11ed0
commit 41e9af392f

View File

@ -57,6 +57,7 @@ class CStandardSendProxies;
class IAchievementMgr;
class CGamestatsData;
class CSteamID;
class IReplayFactory;
class IReplaySystem;
class IServer;
@ -72,9 +73,15 @@ typedef struct player_info_s player_info_t;
#define DLLEXPORT /* */
#endif
#define INTERFACEVERSION_VENGINESERVER "VEngineServer021"
#define INTERFACEVERSION_VENGINESERVER_VERSION_21 "VEngineServer021"
#define INTERFACEVERSION_VENGINESERVER "VEngineServer022"
#define INTERFACEVERSION_VENGINESERVER_INT 22
struct bbox_t;
struct bbox_t
{
Vector mins;
Vector maxs;
};
//-----------------------------------------------------------------------------
// Purpose: Interface the engine exposes to the game DLL
@ -392,31 +399,35 @@ public:
// keyvalues are deleted inside the function
virtual void ClientCommandKeyValues( edict_t *pEdict, KeyValues *pCommand ) = 0;
virtual const CSteamID *GetClientSteamIDByPlayerIndex( int index ) = 0;
// Returns the SteamID of the specified player. It'll be NULL if the player hasn't authenticated yet.
virtual const CSteamID *GetClientSteamIDByPlayerIndex( int entnum ) = 0;
// Gets a list of all clusters' bounds. Returns total number of clusters.
virtual int GetClusterCount() = 0;
virtual int GetAllClusterBounds( bbox_t *pBoxes, int maxboxes ) = 0;
virtual edict_t *CreateFakeClientEx( const char *netname, bool bUnknown ) = 0;
virtual int GetAllClusterBounds( bbox_t *pBBoxList, int maxBBox ) = 0;
// Create a bot with the given name. Returns NULL if fake client can't be created
virtual edict_t *CreateFakeClientEx( const char *netname, bool bReportFakeClient = true ) = 0;
// Server version from the steam.inf, this will be compared to the GC version
virtual int GetServerVersion() const = 0;
// Get sv.GetTime()
virtual float GetServerTime() const = 0;
// Exposed for server plugin authors
virtual IServer *GetIServer() = 0;
virtual IReplaySystem *GetReplay() = 0;
};
abstract_class IServerGCLobby
{
public:
virtual bool HasLobby() const = 0;
virtual bool SteamIDAllowedToConnect( const CSteamID &steamId ) const = 0;
virtual void UpdateServerDetails( void ) = 0;
virtual bool ShouldHibernate() = 0;
};
typedef IVEngineServer IVEngineServer021;
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_4 "ServerGameDLL004"
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_5 "ServerGameDLL005"
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_6 "ServerGameDLL006"
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_7 "ServerGameDLL007"
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_8 "ServerGameDLL008"
#define INTERFACEVERSION_SERVERGAMEDLL "ServerGameDLL009"
#define INTERFACEVERSION_SERVERGAMEDLL_INT 9
class IServerGCLobby;
//-----------------------------------------------------------------------------
// Purpose: These are the interfaces that the game .dll exposes to the engine
@ -431,7 +442,8 @@ public:
CreateInterfaceFn fileSystemFactory,
CGlobalVars *pGlobals) = 0;
virtual bool ReplayInit( CreateInterfaceFn replayFactory ) = 0;
// Setup replay interfaces on the server
virtual bool ReplayInit( CreateInterfaceFn fnReplayFactory ) = 0;
// This is called when a new game is started. (restart, map)
virtual bool GameInit( void ) = 0;
@ -526,16 +538,28 @@ public:
// Called after the steam API has been activated post-level startup
virtual void GameServerSteamAPIActivated( void ) = 0;
// Called after the steam API has been shutdown post-level startup
virtual void GameServerSteamAPIShutdown( void ) = 0;
virtual void SetServerHibernation( bool bHibernating ) = 0;
virtual IServerGCLobby *GetServerGCLobby() = 0;
// interface to the new GC based lobby system
virtual IServerGCLobby *GetServerGCLobby() = 0;
virtual const char *GetServerBrowserMapOverride() = 0;
virtual const char *GetServerBrowserGameData() = 0;
// Return override string to show in the server browser
// "map" column, or NULL to just use the default value
// (the map name)
virtual const char *GetServerBrowserMapOverride() = 0;
// Get gamedata string to send to the master serer updater.
virtual const char *GetServerBrowserGameData() = 0;
// Called to add output to the status command
virtual void Status( void (*print) (const char *fmt, ...) ) = 0;
};
typedef IServerGameDLL IServerGameDLL008;
//-----------------------------------------------------------------------------
// Just an interface version name for the random number interface
// See vstdlib/random.h for the interface definition
@ -573,7 +597,8 @@ public:
virtual void CheckTransmit( CCheckTransmitInfo *pInfo, const unsigned short *pEdictIndices, int nEdicts ) = 0;
};
#define INTERFACEVERSION_SERVERGAMECLIENTS "ServerGameClients004"
#define INTERFACEVERSION_SERVERGAMECLIENTS_VERSION_3 "ServerGameClients003"
#define INTERFACEVERSION_SERVERGAMECLIENTS "ServerGameClients004"
//-----------------------------------------------------------------------------
// Purpose: Player / Client related functions
@ -615,7 +640,7 @@ public:
int dropped_packets, bool ignore, bool paused ) = 0;
// Let the game .dll do stuff after messages have been sent to all of the clients once the server frame is complete
virtual void PostClientMessagesSent( void ) = 0;
virtual void PostClientMessagesSent_DEPRECIATED( void ) = 0;
// For players, looks up the CPlayerState structure corresponding to the player
virtual CPlayerState *GetPlayerState( edict_t *player ) = 0;
@ -636,9 +661,13 @@ public:
// The client has submitted a keyvalues command
virtual void ClientCommandKeyValues( edict_t *pEntity, KeyValues *pKeyValues ) = 0;
virtual void ClientSpawned( edict_t *pEntity ) = 0;
// Hook for player spawning
virtual void ClientSpawned( edict_t *pPlayer ) = 0;
};
typedef IServerGameClients IServerGameClients003;
#define INTERFACEVERSION_UPLOADGAMESTATS "ServerUploadGameStats001"
abstract_class IUploadGameStats
@ -708,4 +737,16 @@ public:
virtual void GetTaggedConVarList( KeyValues *pCvarTagList ) = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Provide hooks for the GC based lobby system
//-----------------------------------------------------------------------------
abstract_class IServerGCLobby
{
public:
virtual bool HasLobby() const = 0;
virtual bool SteamIDAllowedToConnect( const CSteamID &steamId ) const = 0;
virtual void UpdateServerDetails(void) = 0;
virtual bool ShouldHibernate() = 0;
};
#endif // EIFACE_H