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/portal/portal_collideable_enumerator.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/shared/portal/portal_collideable_enumerator.h')
| -rw-r--r-- | game/shared/portal/portal_collideable_enumerator.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/game/shared/portal/portal_collideable_enumerator.h b/game/shared/portal/portal_collideable_enumerator.h new file mode 100644 index 0000000..3294131 --- /dev/null +++ b/game/shared/portal/portal_collideable_enumerator.h @@ -0,0 +1,41 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef PORTAL_COLLIDEABLE_ENUMERATOR_H +#define PORTAL_COLLIDEABLE_ENUMERATOR_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "ispatialpartition.h" + +#ifdef CLIENT_DLL +class C_Prop_Portal; +typedef C_Prop_Portal CProp_Portal; +#else +class CProp_Portal; +#endif + +//only enumerates entities in front of the associated portal and are solid (as in a player would get stuck in them) +class CPortalCollideableEnumerator : public IPartitionEnumerator +{ +private: + EHANDLE m_hTestPortal; //the associated portal that we only want objects in front of + Vector m_vPlaneNormal; //portal plane normal + float m_fPlaneDist; //plane equation distance + Vector m_ptForward1000; //a point exactly 1000 units from the portal center along its forward vector +public: + IHandleEntity *m_pHandles[1024]; + int m_iHandleCount; + CPortalCollideableEnumerator( const CProp_Portal *pAssociatedPortal ); + virtual IterationRetval_t EnumElement( IHandleEntity *pHandleEntity ); +}; + + + +#endif //#ifndef PORTAL_COLLIDEABLE_ENUMERATOR_H
\ No newline at end of file |