mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-10 12:08:23 +00:00
Preemptively update IVEngineServer and IServerTools so we can dynamically use new functions
when interface versions get updated in binaries.
This commit is contained in:
parent
367ad02ba2
commit
b3aa910ad2
106
public/eiface.h
106
public/eiface.h
@ -57,6 +57,9 @@ class CStandardSendProxies;
|
||||
class IAchievementMgr;
|
||||
class CGamestatsData;
|
||||
class CSteamID;
|
||||
class IReplayFactory;
|
||||
class IReplaySystem;
|
||||
class IServer;
|
||||
|
||||
typedef struct player_info_s player_info_t;
|
||||
|
||||
@ -71,8 +74,13 @@ typedef struct player_info_s player_info_t;
|
||||
#endif
|
||||
|
||||
#define INTERFACEVERSION_VENGINESERVER "VEngineServer021"
|
||||
#define INTERFACEVERSION_VENGINESERVER_INT 21
|
||||
|
||||
struct bbox_t;
|
||||
struct bbox_t
|
||||
{
|
||||
Vector mins;
|
||||
Vector maxs;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Interface the engine exposes to the game DLL
|
||||
@ -220,7 +228,7 @@ public:
|
||||
virtual bool LockNetworkStringTables( bool lock ) = 0;
|
||||
|
||||
// Create a bot with the given name. Returns NULL if fake client can't be created
|
||||
virtual edict_t *CreateFakeClient( const char *netname ) = 0;
|
||||
virtual edict_t *CreateFakeClient( const char *netname ) = 0;
|
||||
|
||||
// Get a convar keyvalue for s specified client
|
||||
virtual const char *GetClientConVarValue( int clientIndex, const char *name ) = 0;
|
||||
@ -382,29 +390,35 @@ public:
|
||||
|
||||
// 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;
|
||||
|
||||
|
||||
// Returns the SteamID of the game server
|
||||
virtual const CSteamID *GetGameServerSteamID() = 0;
|
||||
|
||||
// Send a client command keyvalues
|
||||
// keyvalues are deleted inside the function
|
||||
virtual void ClientCommandKeyValues( edict_t *pEdict, KeyValues *pCommand ) = 0;
|
||||
|
||||
virtual const CSteamID *GetClientSteamIDByPlayerIndex( int index ) = 0;
|
||||
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 GetServerVersion() const = 0;
|
||||
virtual void *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;
|
||||
// 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 *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;
|
||||
|
||||
// Only in VEngineServer022 and later
|
||||
|
||||
// Get sv.GetTime()
|
||||
virtual float GetServerTime() const = 0;
|
||||
|
||||
// Exposed for server plugin authors
|
||||
virtual IServer *GetIServer() = 0;
|
||||
|
||||
virtual IReplaySystem *GetReplay() = 0;
|
||||
};
|
||||
|
||||
#define INTERFACEVERSION_SERVERGAMEDLL_VERSION_4 "ServerGameDLL004"
|
||||
@ -413,6 +427,9 @@ public:
|
||||
#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
|
||||
@ -426,9 +443,10 @@ public:
|
||||
CreateInterfaceFn physicsFactory,
|
||||
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;
|
||||
|
||||
@ -518,20 +536,29 @@ public:
|
||||
// iCookie is the value returned by IServerPluginHelpers::StartQueryCvarValue.
|
||||
// Added with version 2 of the interface.
|
||||
virtual void OnQueryCvarValueFinished( QueryCvarCookie_t iCookie, edict_t *pPlayerEntity, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue ) = 0;
|
||||
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
||||
typedef IServerGameDLL IServerGameDLL008;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Just an interface version name for the random number interface
|
||||
// See vstdlib/random.h for the interface definition
|
||||
@ -569,7 +596,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
|
||||
@ -611,7 +639,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;
|
||||
@ -628,13 +656,17 @@ public:
|
||||
|
||||
// A user has had their network id setup and validated
|
||||
virtual void NetworkIDValidated( const char *pszUserName, const char *pszNetworkID ) = 0;
|
||||
|
||||
|
||||
// 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
|
||||
@ -704,4 +736,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
|
||||
|
||||
@ -32,6 +32,9 @@ class CBaseAnimating;
|
||||
class CTakeDamageInfo;
|
||||
class ITempEntsSystem;
|
||||
class IEntityFactoryDictionary;
|
||||
class CBaseTempEntity;
|
||||
class CGlobalEntityList;
|
||||
class IEntityFindFilter;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -217,6 +220,29 @@ public:
|
||||
virtual void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrc, float flRadius, int iClassIgnore, CBaseEntity *pEntityIgnore ) = 0;
|
||||
|
||||
virtual ITempEntsSystem *GetTempEntsSystem( void ) = 0;
|
||||
|
||||
// Only in VSERVERTOOLS003 and later
|
||||
|
||||
virtual CBaseTempEntity *GetTempEntList( void ) = 0;
|
||||
|
||||
virtual CGlobalEntityList *GetEntityList( void ) = 0;
|
||||
virtual bool IsEntityPtr( void *pTest ) = 0;
|
||||
virtual CBaseEntity *FindEntityByClassname( CBaseEntity *pStartEntity, const char *szName ) = 0;
|
||||
virtual CBaseEntity *FindEntityByName( CBaseEntity *pStartEntity, const char *szName, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL, IEntityFindFilter *pFilter = NULL ) = 0;
|
||||
virtual CBaseEntity *FindEntityInSphere( CBaseEntity *pStartEntity, const Vector &vecCenter, float flRadius ) = 0;
|
||||
virtual CBaseEntity *FindEntityByTarget( CBaseEntity *pStartEntity, const char *szName ) = 0;
|
||||
virtual CBaseEntity *FindEntityByModel( CBaseEntity *pStartEntity, const char *szModelName ) = 0;
|
||||
virtual CBaseEntity *FindEntityByNameNearest( const char *szName, const Vector &vecSrc, float flRadius, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL ) = 0;
|
||||
virtual CBaseEntity *FindEntityByNameWithin( CBaseEntity *pStartEntity, const char *szName, const Vector &vecSrc, float flRadius, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL ) = 0;
|
||||
virtual CBaseEntity *FindEntityByClassnameNearest( const char *szName, const Vector &vecSrc, float flRadius ) = 0;
|
||||
virtual CBaseEntity *FindEntityByClassnameWithin( CBaseEntity *pStartEntity, const char *szName, const Vector &vecSrc, float flRadius ) = 0;
|
||||
virtual CBaseEntity *FindEntityByClassnameWithin( CBaseEntity *pStartEntity, const char *szName, const Vector &vecMins, const Vector &vecMaxs ) = 0;
|
||||
virtual CBaseEntity *FindEntityGeneric( CBaseEntity *pStartEntity, const char *szName, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL ) = 0;
|
||||
virtual CBaseEntity *FindEntityGenericWithin( CBaseEntity *pStartEntity, const char *szName, const Vector &vecSrc, float flRadius, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL ) = 0;
|
||||
virtual CBaseEntity *FindEntityGenericNearest( const char *szName, const Vector &vecSrc, float flRadius, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL ) = 0;
|
||||
virtual CBaseEntity *FindEntityNearestFacing( const Vector &origin, const Vector &facing, float threshold ) = 0;
|
||||
virtual CBaseEntity *FindEntityClassNearestFacing( const Vector &origin, const Vector &facing, float threshold, char *classname ) = 0;
|
||||
virtual CBaseEntity *FindEntityProcedural( const char *szName, CBaseEntity *pSearchingEntity = NULL, CBaseEntity *pActivator = NULL, CBaseEntity *pCaller = NULL ) = 0;
|
||||
};
|
||||
|
||||
typedef IServerTools IServerTools001;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user