diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/tf2/ihasbuildpoints.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/tf2/ihasbuildpoints.h')
| -rw-r--r-- | game/shared/tf2/ihasbuildpoints.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/game/shared/tf2/ihasbuildpoints.h b/game/shared/tf2/ihasbuildpoints.h new file mode 100644 index 0000000..bb24d74 --- /dev/null +++ b/game/shared/tf2/ihasbuildpoints.h @@ -0,0 +1,60 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef IHASBUILDPOINTS_H +#define IHASBUILDPOINTS_H +#ifdef _WIN32 +#pragma once +#endif + +class CBaseObject; + +// Derive from this interface if your entity can have objects placed on build points on it +class IHasBuildPoints +{ +public: + // Tell me how many build points you have + virtual int GetNumBuildPoints( void ) const = 0; + + // Give me the origin & angles of the specified build point + virtual bool GetBuildPoint( int iPoint, Vector &vecOrigin, QAngle &vecAngles ) = 0; + + // If the build point wants to parent built objects to an attachment point on the entity, + // it'll return a value >= 1 here specifying which attachment to sit on. + virtual int GetBuildPointAttachmentIndex( int iPoint ) const = 0; + + // Can I build the specified object on the specified build point? + virtual bool CanBuildObjectOnBuildPoint( int iPoint, int iObjectType ) = 0; + + // I've finished building the specified object on the specified build point + virtual void SetObjectOnBuildPoint( int iPoint, CBaseObject *pObject ) = 0; + + // Get the number of objects build on this entity + virtual int GetNumObjectsOnMe( void ) = 0; + + // Get the first object that's built on me + virtual CBaseEntity *GetFirstObjectOnMe( void ) = 0; + + // Get the first object of type, return NULL if no such type available + virtual CBaseObject *GetObjectOfTypeOnMe( int iObjectType ) = 0; + + // Remove all objects built on me + virtual void RemoveAllObjects( void ) = 0; + + // Return the maximum distance that this entity's build points can be snapped to + virtual float GetMaxSnapDistance( int iPoint ) = 0; + + // Return true if it's possible that build points on this entity may move in local space (i.e. due to animation) + virtual bool ShouldCheckForMovement( void ) = 0; + + // I've finished building the specified object on the specified build point + virtual int FindObjectOnBuildPoint( CBaseObject *pObject ) = 0; + + // Returns an exit point for a vehicle built on a build point... + virtual void GetExitPoint( CBaseEntity *pPlayer, int iPoint, Vector *pAbsOrigin, QAngle *pAbsAngles ) = 0; +}; + +#endif // IHASBUILDPOINTS_H |