Update engine/server interfaces for next update

This commit is contained in:
Asher Baker 2020-03-10 23:51:59 +00:00
parent 306122359a
commit c2a3461823

View File

@ -64,6 +64,7 @@ class CGamestatsData;
class CEngineHltvInfo_t; class CEngineHltvInfo_t;
class INetMessage; class INetMessage;
class HltvReplayParams_t; class HltvReplayParams_t;
class EnginePVSContext_t;
namespace google namespace google
{ {
@ -143,8 +144,6 @@ public:
virtual bool CheckOriginInPVS( const Vector &org, const unsigned char *checkpvs, int checkpvssize ) = 0; virtual bool CheckOriginInPVS( const Vector &org, const unsigned char *checkpvs, int checkpvssize ) = 0;
// Check whether the specified worldspace bounding box is inside the specified PVS // Check whether the specified worldspace bounding box is inside the specified PVS
virtual bool CheckBoxInPVS( const Vector &mins, const Vector &maxs, const unsigned char *checkpvs, int checkpvssize ) = 0; virtual bool CheckBoxInPVS( const Vector &mins, const Vector &maxs, const unsigned char *checkpvs, int checkpvssize ) = 0;
// Check whether the specified worldspace bounding box is partially inside the specified PVS
virtual bool CheckBoxPartiallyInPVS( const Vector &mins, const Vector &maxs, const unsigned char *checkpvs, int checkpvssize ) = 0;
// Returns the server assigned userid for this player. Useful for logging frags, etc. // Returns the server assigned userid for this player. Useful for logging frags, etc.
// returns -1 if the edict couldn't be found in the list of players. // returns -1 if the edict couldn't be found in the list of players.
@ -254,24 +253,24 @@ public:
// Reset the pvs, pvssize is the size in bytes of the buffer pointed to by pvs. // Reset the pvs, pvssize is the size in bytes of the buffer pointed to by pvs.
// This should be called right before any calls to AddOriginToPVS // This should be called right before any calls to AddOriginToPVS
virtual void ResetPVS( byte *pvs, int pvssize ) = 0; virtual void ResetPVS( EnginePVSContext_t *pContext, byte *pvs, int pvssize ) = 0;
// Merge the pvs bits into the current accumulated pvs based on the specified origin ( not that each pvs origin has an 8 world unit fudge factor ) // Merge the pvs bits into the current accumulated pvs based on the specified origin ( not that each pvs origin has an 8 world unit fudge factor )
virtual void AddOriginToPVS( const Vector &origin ) = 0; virtual void AddOriginToPVS( EnginePVSContext_t *pContext, const Vector &origin ) = 0;
// Mark a specified area portal as open/closed. // Mark a specified area portal as open/closed.
// Use SetAreaPortalStates if you want to set a bunch of them at a time. // Use SetAreaPortalStates if you want to set a bunch of them at a time.
virtual void SetAreaPortalState( int portalNumber, int isOpen ) = 0; virtual void SetAreaPortalState( int portalNumber, bool isOpen ) = 0;
// Queue a temp entity for transmission // Queue a temp entity for transmission
virtual void PlaybackTempEntity( IRecipientFilter& filter, float delay, const void *pSender, const SendTable *pST, int classID ) = 0; virtual void PlaybackTempEntity( IRecipientFilter& filter, float delay, const void *pSender, const SendTable *pST, int classID ) = 0;
// Given a node number and the specified PVS, return with the node is in the PVS // Given a node number and the specified PVS, return with the node is in the PVS
virtual int CheckHeadnodeVisible( int nodenum, const byte *pvs, int vissize ) = 0; virtual int CheckHeadnodeVisible( int nodenum, const byte *pvs, int vissize ) = 0;
// Using area bits, cheeck whether area1 flows into area2 and vice versa (depends on area portal state) // Using area bits, cheeck whether area1 flows into area2 and vice versa (depends on area portal state); if context is NULL, just use a random context from the last client networked (legacy behavior)
virtual int CheckAreasConnected( int area1, int area2 ) = 0; virtual int CheckAreasConnected( EnginePVSContext_t *pContext, int area1, int area2 ) = 0;
// Given an origin, determine which area index the origin is within // Given an origin, determine which area index the origin is within
virtual int GetArea( const Vector &origin ) = 0; virtual int GetArea( const Vector &origin ) = 0;
// Get area portal bit set // Get area portal bit set
virtual void GetAreaBits( int area, unsigned char *bits, int buflen ) = 0; virtual void GetAreaBits( EnginePVSContext_t *pContext, int area, unsigned char *bits, int buflen ) = 0;
// Given a view origin (which tells us the area to start looking in) and a portal key, // Given a view origin (which tells us the area to start looking in) and a portal key,
// fill in the plane that leads out of this area (it points into whatever area it leads to). // fill in the plane that leads out of this area (it points into whatever area it leads to).
virtual bool GetAreaPortalPlane( Vector const &vViewOrigin, int portalKey, VPlane *pPlane ) = 0; virtual bool GetAreaPortalPlane( Vector const &vViewOrigin, int portalKey, VPlane *pPlane ) = 0;
@ -344,7 +343,7 @@ public:
// Mark some area portals as open/closed. It's more efficient to use this // Mark some area portals as open/closed. It's more efficient to use this
// than a bunch of individual SetAreaPortalState calls. // than a bunch of individual SetAreaPortalState calls.
virtual void SetAreaPortalStates( const int *portalNumbers, const int *isOpen, int nPortals ) = 0; virtual void SetAreaPortalStates( EnginePVSContext_t *pContext, const int *portalNumbers, const bool *isOpen, int nPortals ) = 0;
// Called when relevant edict state flags change. // Called when relevant edict state flags change.
virtual void NotifyEdictFlagsChange( int iEdict ) = 0; virtual void NotifyEdictFlagsChange( int iEdict ) = 0;
@ -371,7 +370,7 @@ public:
// Cleans up the cluster list // Cleans up the cluster list
virtual void CleanUpEntityClusterList( PVSInfo_t *pPVSInfo ) = 0; virtual void CleanUpEntityClusterList( PVSInfo_t *pPVSInfo ) = 0;
virtual void SetAchievementMgr( IAchievementMgr * ) = 0; virtual void SetAchievementMgr( IAchievementMgr *pAchievementMgr ) =0;
virtual IAchievementMgr *GetAchievementMgr() = 0; virtual IAchievementMgr *GetAchievementMgr() = 0;
virtual int GetAppID() = 0; virtual int GetAppID() = 0;
@ -429,14 +428,14 @@ public:
virtual void Pause( bool bPause, bool bForce = false ) = 0; virtual void Pause( bool bPause, bool bForce = false ) = 0;
virtual void SetTimescale( float flTimescale ) = 0; virtual void SetGameTimescale( float flTimescale ) = 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. // Returns the SteamID of the specified player. It'll be NULL if the player hasn't authenticated yet.
virtual const CSteamID *GetClientSteamID( const edict_t *pPlayerEdict, bool bValidatedIDOnly = false ) = 0; virtual const CSteamID *GetClientSteamID( const edict_t *pPlayerEdict, bool bRequireFullyAuthenticated = false ) = 0;
// Returns the SteamID of the game server // Returns the SteamID of the game server
virtual const CSteamID *GetGameServerSteamID() = 0; virtual const CSteamID *GetGameServerSteamID() = 0;
@ -451,13 +450,12 @@ public:
virtual bool HasPaintmap() = 0; virtual bool HasPaintmap() = 0;
// Calls ShootPaintSphere // Calls ShootPaintSphere
virtual bool SpherePaintSurface( const model_t *pModel, const Vector &, unsigned char, float, float ) = 0; virtual bool SpherePaintSurface( const model_t *pModel, const Vector &vPosition, unsigned char color, float flSphereRadius, float flPaintCoatPercent ) = 0;
virtual void SphereTracePaintSurface( const model_t *pModel, const Vector &, const Vector &, float, CUtlVector<unsigned char> & ) = 0;
virtual void SphereTracePaintSurface( const model_t *pModel, const Vector& vPosition, const Vector& vContactNormal, float flSphereRadius, CUtlVector<unsigned char> &surfColor ) = 0;
virtual void RemoveAllPaint() = 0; virtual void RemoveAllPaint() = 0;
virtual void PaintAllSurfaces( unsigned char ) = 0; virtual void PaintAllSurfaces( unsigned char color ) = 0;
virtual void RemovePaint( const model_t *pModel ) = 0; virtual void RemovePaint( const model_t *pModel ) = 0;
// Send a client command keyvalues // Send a client command keyvalues
@ -492,13 +490,22 @@ public:
virtual void UpdateHltvExternalViewers( uint32 totalSpectators, uint32 spectatorsLinkedToSteam) = 0; virtual void UpdateHltvExternalViewers( uint32 totalSpectators, uint32 spectatorsLinkedToSteam) = 0;
virtual bool WasShutDownRequested( void ) const = 0; virtual bool WasShutDownRequested( void ) const = 0;
virtual void *StartClientHltvReplay( int client , const HltvReplayParams_t & ) = 0; virtual bool StartClientHltvReplay( int client, const HltvReplayParams_t &params ) = 0;
virtual void *StopClientHltvReplay( int client ) = 0; virtual void StopClientHltvReplay( int client ) = 0;
virtual int GetClientHltvReplayDelay( int client ) = 0; virtual int GetClientHltvReplayDelay( int client ) = 0;
virtual bool HasHltvReplay( void ) = 0; virtual bool HasHltvReplay( void ) = 0;
virtual bool ClientCanStartHltvReplay( int client ) = 0; virtual bool ClientCanStartHltvReplay( int client ) = 0;
virtual int ClientResetReplayRequestTime( int client ) = 0; virtual void ClientResetReplayRequestTime( int client ) = 0;
virtual bool AnyClientsInHltvReplayMode( void ) = 0; virtual bool AnyClientsInHltvReplayMode( void ) = 0;
virtual int GetLocalClientIndex( void ) = 0;
virtual void StopClientsHltvReplay( void ) = 0;
virtual void SetFixupTarget( int edict ) = 0;
virtual float GetGameTimescale() = 0;
//BBMigration
virtual bool SetBBTVEnabled(bool enabled) = 0;
}; };
#define INTERFACEVERSION_SERVERGAMEDLL "ServerGameDLL005" #define INTERFACEVERSION_SERVERGAMEDLL "ServerGameDLL005"
@ -585,10 +592,6 @@ public:
// Called once per frame even when no level is loaded... // Called once per frame even when no level is loaded...
virtual void Think( bool finalTick ) = 0; virtual void Think( bool finalTick ) = 0;
#ifdef _XBOX
virtual void GetTitleName( const char *pMapName, char* pTitleBuff, int titleBuffSize ) = 0;
#endif
virtual void PreSaveGameLoaded( char const *pSaveName, bool bCurrentlyInGame ) = 0; virtual void PreSaveGameLoaded( char const *pSaveName, bool bCurrentlyInGame ) = 0;
// Returns true if the game DLL wants the server not to be made public. // Returns true if the game DLL wants the server not to be made public.
@ -611,7 +614,7 @@ public:
virtual void GameServerSteamAPIActivated( bool bActivated ) = 0; virtual void GameServerSteamAPIActivated( bool bActivated ) = 0;
// Called to apply lobby settings to a dedicated server // Called to apply lobby settings to a dedicated server
virtual void ApplyGameSettings( KeyValues *pKV ) = 0; virtual bool ApplyGameSettings( KeyValues *pKV ) = 0;
// //
virtual void GetMatchmakingTags( char *buf, size_t bufSize ) = 0; virtual void GetMatchmakingTags( char *buf, size_t bufSize ) = 0;
@ -634,13 +637,15 @@ public:
virtual void UpdateUGCMap( PublishedFileId_t file ) = 0; virtual void UpdateUGCMap( PublishedFileId_t file ) = 0;
virtual int GetMessageEncryptionKey( INetMessage *msg ) = 0; virtual int GetMessageEncryptionKey( INetMessage *msg ) = 0;
virtual bool ShouldHoldGameServerReservation( float flTime ) = 0; virtual bool ShouldHoldGameServerReservation( float flTime ) = 0;
virtual bool OnPureServerFileValidationFailure( edict_t *pPlayer, const char *pszPathID, const char *pszFileName, virtual void OnPureServerFileValidationFailure( edict_t *pPlayer, const char *pszPathID, const char *pszFileName,
CRC32_t crcIOSequence, int eFileHashType, int cbFileLen, int nPackFileNumber, int nPackFileID ) = 0; CRC32_t crcIOSequence, int eFileHashType, int cbFileLen, int nPackFileNumber, int nPackFileID ) = 0;
virtual void PrecacheParticleSystemFile( const char *pszFilename ) = 0; virtual void PrecacheParticleSystemFile( const char *pszFilename ) = 0;
virtual void ClientConnectionValidatePreNetChan( bool, const char *, int, unsigned long long ) = 0; virtual char const * ClientConnectionValidatePreNetChan( bool bGameServer, const char *adr, int nAuthProtocol, uint64 ullSteamID ) = 0;
virtual void OnEngineClientNetworkEvent( edict_t *, unsigned long long, int, void * ) = 0; virtual void OnEngineClientNetworkEvent( edict_t *edictClient, uint64 ullSteamID, int nEventType, void *pvParam ) = 0;
virtual void GetNewestSubscribedFiles() = 0; virtual void EngineGotvSyncPacket( const void *pPkt ) = 0;
virtual bool ValidateAndAddActiveCaster( const CSteamID & ) = 0; virtual bool OnEngineClientProxiedRedirect( uint64 ullClient, const char *adrProxiedRedirect, const char *adrRegular ) = 0;
virtual bool LogForHTTPListeners( const char *szLogLine ) = 0;
virtual bool ValidateAndAddActiveCaster( const CSteamID &steamID, bool bAdd ) = 0;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------