mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
add source-sdk-2013
This commit is contained in:
@@ -83,7 +83,7 @@ class CUserCmd;
|
||||
class CSkyCamera;
|
||||
class CEntityMapData;
|
||||
class INextBot;
|
||||
class IHasAttributes;
|
||||
|
||||
|
||||
typedef CUtlVector< CBaseEntity* > EntityList_t;
|
||||
|
||||
@@ -904,7 +904,7 @@ public:
|
||||
virtual int OnTakeDamage( const CTakeDamageInfo &info );
|
||||
|
||||
// This is what you should call to apply damage to an entity.
|
||||
int TakeDamage( const CTakeDamageInfo &info );
|
||||
void TakeDamage( const CTakeDamageInfo &info );
|
||||
virtual void AdjustDamageDirection( const CTakeDamageInfo &info, Vector &dir, CBaseEntity *pEnt ) {}
|
||||
|
||||
virtual int TakeHealth( float flHealth, int bitsDamageType );
|
||||
@@ -965,7 +965,7 @@ public:
|
||||
int GetTeamNumber( void ) const; // Get the Team number of the team this entity is on
|
||||
virtual void ChangeTeam( int iTeamNum ); // Assign this entity to a team.
|
||||
bool IsInTeam( CTeam *pTeam ) const; // Returns true if this entity's in the specified team
|
||||
bool InSameTeam( const CBaseEntity *pEntity ) const; // Returns true if the specified entity is on the same team as this one
|
||||
bool InSameTeam( CBaseEntity *pEntity ) const; // Returns true if the specified entity is on the same team as this one
|
||||
bool IsInAnyTeam( void ) const; // Returns true if this entity is in any team
|
||||
const char *TeamID( void ) const; // Returns the name of the team this entity is on.
|
||||
|
||||
@@ -1087,57 +1087,49 @@ public:
|
||||
int GetHealth() const { return m_iHealth; }
|
||||
void SetHealth( int amt ) { m_iHealth = amt; }
|
||||
|
||||
float HealthFraction() const;
|
||||
|
||||
// Ugly code to lookup all functions to make sure they are in the table when set.
|
||||
#ifdef _DEBUG
|
||||
|
||||
#ifdef GNUC
|
||||
#define ENTITYFUNCPTR_SIZE 8
|
||||
#else
|
||||
#define ENTITYFUNCPTR_SIZE 4
|
||||
#endif
|
||||
|
||||
void FunctionCheck( void *pFunction, const char *name );
|
||||
|
||||
ENTITYFUNCPTR TouchSet( ENTITYFUNCPTR func, char *name )
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == ENTITYFUNCPTR_SIZE );
|
||||
#ifdef GNUC
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
|
||||
#else
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
|
||||
#endif
|
||||
m_pfnTouch = func;
|
||||
FunctionCheck( *(reinterpret_cast<void **>(&m_pfnTouch)), name );
|
||||
return func;
|
||||
}
|
||||
USEPTR UseSet( USEPTR func, char *name )
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == ENTITYFUNCPTR_SIZE );
|
||||
#ifdef GNUC
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
|
||||
#else
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
|
||||
#endif
|
||||
m_pfnUse = func;
|
||||
FunctionCheck( *(reinterpret_cast<void **>(&m_pfnUse)), name );
|
||||
return func;
|
||||
}
|
||||
ENTITYFUNCPTR BlockedSet( ENTITYFUNCPTR func, char *name )
|
||||
{
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == ENTITYFUNCPTR_SIZE );
|
||||
#ifdef GNUC
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 8 );
|
||||
#else
|
||||
COMPILE_TIME_ASSERT( sizeof(func) == 4 );
|
||||
#endif
|
||||
m_pfnBlocked = func;
|
||||
FunctionCheck( *(reinterpret_cast<void **>(&m_pfnBlocked)), name );
|
||||
return func;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
#endif
|
||||
virtual void ModifyOrAppendCriteria( AI_CriteriaSet& set );
|
||||
void AppendContextToCriteria( AI_CriteriaSet& set, const char *prefix = "" );
|
||||
void DumpResponseCriteria( void );
|
||||
|
||||
// Return the IHasAttributes interface for this base entity. Removes the need for:
|
||||
// dynamic_cast< IHasAttributes * >( pEntity );
|
||||
// Which is remarkably slow.
|
||||
// GetAttribInterface( CBaseEntity *pEntity ) in attribute_manager.h uses
|
||||
// this function, tests for NULL, and Asserts m_pAttributes == dynamic_cast.
|
||||
inline IHasAttributes *GetHasAttributesInterfacePtr() const { return m_pAttributes; }
|
||||
|
||||
protected:
|
||||
// NOTE: m_pAttributes needs to be set in the leaf class constructor.
|
||||
IHasAttributes *m_pAttributes;
|
||||
|
||||
|
||||
private:
|
||||
friend class CAI_Senses;
|
||||
CBaseEntity *m_pLink;// used for temporary link-list operations.
|
||||
@@ -1748,7 +1740,6 @@ private:
|
||||
// randon number generators to spit out the same random numbers on both sides for a particular
|
||||
// usercmd input.
|
||||
static int m_nPredictionRandomSeed;
|
||||
static int m_nPredictionRandomSeedServer;
|
||||
static CBasePlayer *m_pPredictionPlayer;
|
||||
|
||||
// FIXME: Make hierarchy a member of CBaseEntity
|
||||
@@ -1762,7 +1753,7 @@ private:
|
||||
|
||||
public:
|
||||
// Accessors for above
|
||||
static int GetPredictionRandomSeed( bool bUseUnSyncedServerPlatTime = false );
|
||||
static int GetPredictionRandomSeed( void );
|
||||
static void SetPredictionRandomSeed( const CUserCmd *cmd );
|
||||
static CBasePlayer *GetPredictionPlayer( void );
|
||||
static void SetPredictionPlayer( CBasePlayer *player );
|
||||
@@ -1800,18 +1791,6 @@ public:
|
||||
{
|
||||
return s_bAbsQueriesValid;
|
||||
}
|
||||
|
||||
virtual bool ShouldBlockNav() const { return true; }
|
||||
|
||||
virtual bool ShouldForceTransmitsForTeam( int iTeam ) { return false; }
|
||||
|
||||
void SetTruceValidForEnt( bool bTruceValidForEnt ) { m_bTruceValidForEnt = bTruceValidForEnt; }
|
||||
virtual bool IsTruceValidForEnt( void ) const { return m_bTruceValidForEnt; }
|
||||
|
||||
private:
|
||||
CThreadFastMutex m_CalcAbsolutePositionMutex;
|
||||
|
||||
bool m_bTruceValidForEnt;
|
||||
};
|
||||
|
||||
// Send tables exposed in this module.
|
||||
|
||||
Reference in New Issue
Block a user