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/server/portal/func_noportal_volume.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/portal/func_noportal_volume.h')
| -rw-r--r-- | game/server/portal/func_noportal_volume.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/game/server/portal/func_noportal_volume.h b/game/server/portal/func_noportal_volume.h new file mode 100644 index 0000000..fcf91ee --- /dev/null +++ b/game/server/portal/func_noportal_volume.h @@ -0,0 +1,56 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: A volume in which no portal can be placed. Keeps a global list loaded in from the map +// and provides an interface with which prop_portal can get this list and avoid successfully +// creating portals wholly or partially inside the volume. +// +// $NoKeywords: $ +//======================================================================================// + +#ifndef _FUNC_NOPORTAL_VOLUME_H_ +#define _FUNC_NOPORTAL_VOLUME_H_ + +#ifdef _WIN32 +#pragma once +#endif + +#include "cbase.h" + +class CFuncNoPortalVolume : public CBaseEntity +{ +public: + DECLARE_CLASS( CFuncNoPortalVolume, CBaseEntity ); + + CFuncNoPortalVolume(); + ~CFuncNoPortalVolume(); + + // Overloads from base entity + virtual void Spawn( void ); + + void OnActivate( void ); + + // Inputs to flip functionality on and off + void InputActivate( inputdata_t &inputdata ); + void InputDeactivate( inputdata_t &inputdata ); + void InputToggle( inputdata_t &inputdata ); + + // misc public methods + unsigned int GetIndex () { return m_iListIndex; } // returns the list index of this camera + bool IsActive() { return m_bActive; } // is this area currently blocking portals + + CFuncNoPortalVolume *m_pNext; // Needed for the template list + + DECLARE_DATADESC(); + +private: + bool m_bActive; // are we currently blocking portals + unsigned int m_iListIndex; // what is my index into the global noportal_volume list + + +}; + +// Global interface for getting the list of noportal_volumes +CFuncNoPortalVolume* GetNoPortalVolumeList(); + + +#endif
\ No newline at end of file |