mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Updated IServerGameClients and IVEngineServer.
This commit is contained in:
@ -140,8 +140,8 @@ public:
|
||||
|
||||
// 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.
|
||||
virtual int GetPlayerUserId( const edict_t *e ) = 0;
|
||||
virtual const char *GetPlayerNetworkIDString( const edict_t *e ) = 0;
|
||||
virtual int GetPlayerUserId( int clientSlot ) = 0;
|
||||
virtual const char *GetPlayerNetworkIDString( int clientSlot ) = 0;
|
||||
virtual bool IsUserIDInUse( int userID ) = 0; // TERROR: used for transitioning
|
||||
virtual int GetLoadingProgressForUserID( int userID ) = 0; // TERROR: used for transitioning
|
||||
|
||||
@ -173,7 +173,7 @@ public:
|
||||
virtual void EmitAmbientSound( int entindex, const Vector &pos, const char *samp, float vol, soundlevel_t soundlevel, int fFlags, int pitch, float delay = 0.0f ) = 0;
|
||||
|
||||
// Fade out the client's volume level toward silence (or fadePercent)
|
||||
virtual void FadeClientVolume( const edict_t *pEdict, float fadePercent, float fadeOutSeconds, float holdTime, float fadeInSeconds ) = 0;
|
||||
virtual void FadeClientVolume( int playerIndex, float fadePercent, float fadeOutSeconds, float holdTime, float fadeInSeconds ) = 0;
|
||||
|
||||
// Sentences / sentence groups
|
||||
virtual int SentenceGroupPick( int groupIndex, char *name, int nameBufLen ) = 0;
|
||||
@ -189,7 +189,7 @@ public:
|
||||
// Execute any commands currently in the command parser immediately (instead of once per frame)
|
||||
virtual void ServerExecute( void ) = 0;
|
||||
// Issue the specified command to the specified client (mimics that client typing the command at the console).
|
||||
virtual void ClientCommand( edict_t *pEdict, const char *szFmt, ... ) FMTFUNCTION( 3, 4 ) = 0;
|
||||
virtual void ClientCommand( int playerIndex, const char *szFmt, ... ) FMTFUNCTION( 3, 4 ) = 0;
|
||||
|
||||
// Set the lightstyle to the specified value and network the change to any connected clients. Note that val must not
|
||||
// change place in memory (use MAKE_STRING) for anything that's not compiled into your mod.
|
||||
@ -204,7 +204,7 @@ public:
|
||||
virtual void SendUserMessage( IRecipientFilter &filter, int message, const google::protobuf::Message &msg ) = 0;
|
||||
|
||||
// Print szMsg to the client console.
|
||||
virtual void ClientPrintf( edict_t *pEdict, const char *szMsg ) = 0;
|
||||
virtual void ClientPrintf( int playerIndex, const char *szMsg ) = 0;
|
||||
|
||||
// SINGLE PLAYER/LISTEN SERVER ONLY (just matching the client .dll api for this)
|
||||
// Prints the formatted string to the notification area of the screen ( down the right hand edge
|
||||
@ -215,10 +215,10 @@ public:
|
||||
virtual void Con_NXPrintf( const struct con_nprint_s *info, const char *fmt, ... ) = 0;
|
||||
|
||||
// Change a specified player's "view entity" (i.e., use the view entity position/orientation for rendering the client view)
|
||||
virtual void SetView( const edict_t *pClient, const edict_t *pViewent ) = 0;
|
||||
virtual void SetView( int playerIndex, int viewEntIndex ) = 0;
|
||||
|
||||
// Set the player's crosshair angle
|
||||
virtual void CrosshairAngle( const edict_t *pClient, float pitch, float yaw ) = 0;
|
||||
virtual void CrosshairAngle( int playerIndex, float pitch, float yaw ) = 0;
|
||||
|
||||
// Get the current game directory (hl2, tf2, hl1, cstrike, etc.)
|
||||
virtual void GetGameDir( char *szGetGameDir, int maxlength ) = 0;
|
||||
@ -230,8 +230,8 @@ public:
|
||||
// Be sure to reset the lock after executing your code!!!
|
||||
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;
|
||||
// Create a bot with the given name. Player index is -1 if fake client can't be created
|
||||
virtual void CreateFakeClient( int *playerIndex, const char *netname ) = 0;
|
||||
|
||||
// Get a convar keyvalue for s specified client
|
||||
virtual const char *GetClientConVarValue( int clientIndex, const char *name ) = 0;
|
||||
@ -280,12 +280,12 @@ public:
|
||||
virtual void LogPrint( const char *msg ) = 0;
|
||||
virtual bool IsLogEnabled() = 0;
|
||||
// Builds PVS information for an entity
|
||||
virtual void BuildEntityClusterList( edict_t *pEdict, PVSInfo_t *pPVSInfo ) = 0;
|
||||
virtual void BuildEntityClusterList( int edictIndex, PVSInfo_t *pPVSInfo ) = 0;
|
||||
|
||||
// A solid entity moved, update spatial partition
|
||||
virtual void SolidMoved( edict_t *pSolidEnt, ICollideable *pSolidCollide, const Vector* pPrevAbsOrigin, bool testSurroundingBoundsOnly ) = 0;
|
||||
virtual void SolidMoved( int solidEntIndex, ICollideable *pSolidCollide, const Vector* pPrevAbsOrigin, bool testSurroundingBoundsOnly ) = 0;
|
||||
// A trigger entity moved, update spatial partition
|
||||
virtual void TriggerMoved( edict_t *pTriggerEnt, bool testSurroundingBoundsOnly ) = 0;
|
||||
virtual void TriggerMoved( int triggerEntIndex, bool testSurroundingBoundsOnly ) = 0;
|
||||
|
||||
// Create/destroy a custom spatial partition
|
||||
virtual ISpatialPartition *CreateSpatialPartition( const Vector& worldmin, const Vector& worldmax ) = 0;
|
||||
@ -318,7 +318,7 @@ public:
|
||||
virtual void ClearSaveDirAfterClientLoad() = 0;
|
||||
|
||||
// Sets a USERINFO client ConVar for a fakeclient
|
||||
virtual void SetFakeClientConVarValue( edict_t *pEntity, const char *cvar, const char *value ) = 0;
|
||||
virtual void SetFakeClientConVarValue( int clientIndex, const char *cvar, const char *value ) = 0;
|
||||
|
||||
// Marks the material (vmt file) for consistency checking. If the client and server have different
|
||||
// contents for the file, the client's vmt can only use the VertexLitGeneric shader, and can only
|
||||
@ -347,7 +347,7 @@ public:
|
||||
// Returns true if the engine is an internal build. i.e. is using the internal bugreporter.
|
||||
virtual bool IsInternalBuild( void ) = 0;
|
||||
|
||||
virtual IChangeInfoAccessor *GetChangeAccessor( const edict_t *pEdict ) = 0;
|
||||
virtual IChangeInfoAccessor *GetChangeAccessor( int edictIndex ) = 0;
|
||||
|
||||
// Name of most recently load .sav file
|
||||
virtual char const *GetMostRecentlyLoadedFileName() = 0;
|
||||
@ -372,7 +372,7 @@ public:
|
||||
//
|
||||
// Store the return value if you want to match this specific query to the OnQueryCvarValueFinished call.
|
||||
// Returns InvalidQueryCvarCookie if the entity is invalid.
|
||||
virtual QueryCvarCookie_t StartQueryCvarValue( edict_t *pPlayerEntity, const char *pName ) = 0;
|
||||
virtual QueryCvarCookie_t StartQueryCvarValue( int clientIndex, const char *pName ) = 0;
|
||||
|
||||
virtual void InsertServerCommand( const char *str ) = 0;
|
||||
|
||||
@ -380,7 +380,7 @@ public:
|
||||
virtual bool GetPlayerInfo( int ent_num, player_info_t *pinfo ) = 0;
|
||||
|
||||
// Returns true if this client has been fully authenticated by Steam
|
||||
virtual bool IsClientFullyAuthenticated( edict_t *pEdict ) = 0;
|
||||
virtual bool IsClientFullyAuthenticated( int clientIndex ) = 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.
|
||||
@ -420,7 +420,7 @@ public:
|
||||
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 const CSteamID *GetClientSteamID( int clientIndex ) = 0;
|
||||
|
||||
// Returns the SteamID of the game server
|
||||
virtual const CSteamID *GetGameServerSteamID() = 0;
|
||||
@ -435,7 +435,7 @@ public:
|
||||
virtual void RemoveAllPaint() = 0;
|
||||
|
||||
// Returns the XUID of the specified player. It'll be NULL if the player hasn't connected yet.
|
||||
virtual uint64 GetClientXUID( edict_t *pPlayerEdict ) = 0;
|
||||
virtual uint64 GetClientXUID( int clientIndex ) = 0;
|
||||
virtual bool IsActiveApp() = 0;
|
||||
|
||||
virtual void DisconnectAllClients( const char * szReason, bool skipHLTV ) = 0;
|
||||
@ -444,7 +444,7 @@ public:
|
||||
|
||||
virtual bool GetEngineHltvInfo( CEngineHltvInfo_t &out ) = 0;
|
||||
|
||||
virtual bool _UnknownFunc1( bool bSomethingToDoWithHLTV ) = 0;
|
||||
virtual bool IsClientLowViolence( int clientIndex ) = 0;
|
||||
};
|
||||
|
||||
abstract_class IServerGCLobby
|
||||
@ -582,6 +582,8 @@ public:
|
||||
|
||||
virtual IServerGCLobby *GetServerGCLobby() = 0;
|
||||
virtual void GameServerSteamAPIShutdown( void ) = 0;
|
||||
|
||||
virtual void GetGameStatus( void (*inputFunc) (const char *fmt, ...) ) = 0;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -634,67 +636,68 @@ public:
|
||||
|
||||
// Client is connecting to server ( return false to reject the connection )
|
||||
// You can specify a rejection message by writing it into reject
|
||||
virtual bool ClientConnect( edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen ) = 0;
|
||||
virtual bool ClientConnect( int index, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen ) = 0;
|
||||
|
||||
// Client is going active
|
||||
// If bLoadGame is true, don't spawn the player because its state is already setup.
|
||||
virtual void ClientActive( edict_t *pEntity, bool bLoadGame ) = 0;
|
||||
virtual void ClientActive( int index, bool bLoadGame ) = 0;
|
||||
|
||||
virtual void ClientFullyConnect( edict_t *pEntity ) = 0;
|
||||
virtual void ClientFullyConnect( int index ) = 0;
|
||||
|
||||
// Client is disconnecting from server
|
||||
virtual void ClientDisconnect( edict_t *pEntity ) = 0;
|
||||
virtual void ClientDisconnect( int index ) = 0;
|
||||
|
||||
// Client is connected and should be put in the game
|
||||
virtual void ClientPutInServer( edict_t *pEntity, char const *playername ) = 0;
|
||||
virtual void ClientPutInServer( int index, char const *playername ) = 0;
|
||||
|
||||
// The client has typed a command at the console
|
||||
virtual void ClientCommand( edict_t *pEntity, const CCommand &args ) = 0;
|
||||
virtual void ClientCommand( int index, const CCommand &args ) = 0;
|
||||
|
||||
// Sets the client index for the client who typed the command into his/her console
|
||||
virtual void SetCommandClient( int index ) = 0;
|
||||
|
||||
// A player changed one/several replicated cvars (name etc)
|
||||
virtual void ClientSettingsChanged( edict_t *pEdict ) = 0;
|
||||
virtual void ClientSettingsChanged( int index ) = 0;
|
||||
|
||||
// Determine PVS origin and set PVS for the player/viewentity
|
||||
virtual void ClientSetupVisibility( edict_t *pViewEntity, edict_t *pClient, unsigned char *pvs, int pvssize ) = 0;
|
||||
virtual void ClientSetupVisibility( edict_t *pViewEntity, int clientindex, unsigned char *pvs, int pvssize ) = 0;
|
||||
|
||||
// A block of CUserCmds has arrived from the user, decode them and buffer for execution during player simulation
|
||||
virtual float ProcessUsercmds( edict_t *player, bf_read *buf, int numcmds, int totalcmds,
|
||||
virtual float ProcessUsercmds( int index, bf_read *buf, int numcmds, int totalcmds,
|
||||
int dropped_packets, bool ignore, bool paused ) = 0;
|
||||
|
||||
// For players, looks up the CPlayerState structure corresponding to the player
|
||||
virtual CPlayerState *GetPlayerState( edict_t *player ) = 0;
|
||||
virtual CPlayerState *GetPlayerState( int index ) = 0;
|
||||
|
||||
// Get the ear position for a specified client
|
||||
virtual void ClientEarPosition( edict_t *pEntity, Vector *pEarOrigin ) = 0;
|
||||
virtual void ClientEarPosition( int index, Vector *pEarOrigin ) = 0;
|
||||
|
||||
// returns number of delay ticks if player is in Replay mode (0 = no delay)
|
||||
virtual int GetReplayDelay( edict_t *player, int& entity ) = 0;
|
||||
virtual int GetReplayDelay( int index, int& entity ) = 0;
|
||||
|
||||
// Anything this game .dll wants to add to the bug reporter text (e.g., the entity/model under the picker crosshair)
|
||||
// can be added here
|
||||
virtual void GetBugReportInfo( char *buf, int buflen ) = 0;
|
||||
|
||||
// TERROR: A player sent a voice packet
|
||||
virtual void ClientVoice( edict_t *pEdict ) = 0;
|
||||
virtual void ClientVoice( int index ) = 0;
|
||||
|
||||
// A user has had their network id setup and validated
|
||||
virtual void NetworkIDValidated( const char *pszUserName, const char *pszNetworkID ) = 0;
|
||||
|
||||
// Returns max splitscreen slot count ( 1 == no splits, 2 for 2-player split screen )
|
||||
virtual int GetMaxSplitscreenPlayers() = 0;
|
||||
virtual int GetMaxSplitscreenPlayers() = 0; // 68
|
||||
|
||||
// Return # of human slots, -1 if can't determine or don't care (engine will assume it's == maxplayers )
|
||||
virtual int GetMaxHumanPlayers() = 0;
|
||||
|
||||
// The client has submitted a keyvalues command
|
||||
virtual void ClientCommandKeyValues( edict_t *pEntity, KeyValues *pKeyValues ) = 0;
|
||||
// Gets the player ptr like other funcs, but then does a dynamic cast on it, presumably to a DOTA player,
|
||||
// then returns a bool value from casted player
|
||||
virtual bool UnknownFuncGetDOTASpecificPlayerSomething( int index ) = 0;
|
||||
|
||||
virtual void UnknownFunc1() = 0;
|
||||
|
||||
virtual bool DispatchClientMessage( edict_t *pEntity, int msg_type, int size, uint8 *pData ) = 0;
|
||||
virtual bool DispatchClientMessage( int index, int msg_type, int size, uint8 *pData ) = 0;
|
||||
};
|
||||
|
||||
#define INTERFACEVERSION_UPLOADGAMESTATS "ServerUploadGameStats001"
|
||||
|
Reference in New Issue
Block a user