1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Add updated IServerTools

This commit is contained in:
Nick Hastings 2021-09-23 19:44:57 -04:00
parent 01e36b41b9
commit 729e2a1111
2 changed files with 56 additions and 14 deletions

View File

@ -506,6 +506,7 @@ public:
//BBMigration
virtual bool SetBBTVEnabled(bool enabled) = 0;
virtual IServer *GetIServer() = 0;
};
#define INTERFACEVERSION_SERVERGAMEDLL "ServerGameDLL005"

View File

@ -29,6 +29,14 @@ class IToolSystem;
class IClientRenderable;
class Vector;
class QAngle;
class CBaseEntity;
class CBaseAnimating;
class CTakeDamageInfo;
class ITempEntsSystem;
class IEntityFactoryDictionary;
class CBaseTempEntity;
class CGlobalEntityList;
class IEntityFindFilter;
//-----------------------------------------------------------------------------
@ -200,19 +208,19 @@ public:
virtual bool IsInNoClipMode( IClientEntity *pClientPlayer = NULL ) = 0;
// entity searching
virtual void *FirstEntity( void ) = 0;
virtual void *NextEntity( void *pEntity ) = 0;
virtual void *FindEntityByHammerID( int iHammerID ) = 0;
virtual CBaseEntity *FirstEntity( void ) = 0;
virtual CBaseEntity *NextEntity( CBaseEntity *pEntity ) = 0;
virtual CBaseEntity *FindEntityByHammerID( int iHammerID ) = 0;
// entity query
virtual bool GetKeyValue( void *pEntity, const char *szField, char *szValue, int iMaxLen ) = 0;
virtual bool SetKeyValue( void *pEntity, const char *szField, const char *szValue ) = 0;
virtual bool SetKeyValue( void *pEntity, const char *szField, float flValue ) = 0;
virtual bool SetKeyValue( void *pEntity, const char *szField, const Vector &vecValue ) = 0;
virtual bool GetKeyValue( CBaseEntity *pEntity, const char *szField, char *szValue, int iMaxLen ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, const char *szValue ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, float flValue ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, const Vector &vecValue ) = 0;
// entity spawning
virtual void *CreateEntityByName( const char *szClassName ) = 0;
virtual void DispatchSpawn( void *pEntity ) = 0;
virtual CBaseEntity *CreateEntityByName( const char *szClassName ) = 0;
virtual void DispatchSpawn( CBaseEntity *pEntity ) = 0;
virtual bool DestroyEntityByHammerId( int iHammerID ) = 0;
// This function respawns the entity into the same entindex slot AND tricks the EHANDLE system into thinking it's the same
@ -226,13 +234,46 @@ public:
virtual void AddOriginToPVS( const Vector &org ) = 0;
virtual void MoveEngineViewTo( const Vector &vPos, const QAngle &vAngles ) = 0;
// Call UTIL_Remove on the entity.
virtual void RemoveEntity( int nHammerID ) = 0;
virtual CBaseEntity *GetBaseEntityByEntIndex( int iEntIndex ) = 0;
virtual void RemoveEntity( CBaseEntity *pEntity ) = 0;
virtual void RemoveEntityImmediate( CBaseEntity *pEntity ) = 0;
virtual IEntityFactoryDictionary *GetEntityFactoryDictionary( void ) = 0;
virtual void SetMoveType( CBaseEntity *pEntity, int val ) = 0;
virtual void SetMoveType( CBaseEntity *pEntity, int val, int moveCollide ) = 0;
virtual void ResetSequence( CBaseAnimating *pEntity, int nSequence ) = 0;
virtual void ResetSequenceInfo( CBaseAnimating *pEntity ) = 0;
virtual void ClearMultiDamage( void ) = 0;
virtual void ApplyMultiDamage( void ) = 0;
virtual void AddMultiDamage( const CTakeDamageInfo &pTakeDamageInfo, CBaseEntity *pEntity ) = 0;
virtual void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrc, float flRadius, int iClassIgnore, CBaseEntity *pEntityIgnore ) = 0;
virtual ITempEntsSystem *GetTempEntsSystem( void ) = 0;
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;
virtual void *CreateItemEntityByName( const char *szSchemaName ) = 0;
};
#define VSERVERTOOLS_INTERFACE_VERSION "VSERVERTOOLS001"
#define VSERVERTOOLS_INTERFACE_VERSION "VSERVERTOOLS003"
#endif // ITOOLENTITY_H