summaryrefslogtreecommitdiff
path: root/game/server/portal/func_portal_orientation.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/portal/func_portal_orientation.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/portal/func_portal_orientation.h')
-rw-r--r--game/server/portal/func_portal_orientation.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/game/server/portal/func_portal_orientation.h b/game/server/portal/func_portal_orientation.h
new file mode 100644
index 0000000..5941a2d
--- /dev/null
+++ b/game/server/portal/func_portal_orientation.h
@@ -0,0 +1,51 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Volume entity which overrides the placement angles of a portal placed within its bounds.
+//
+// $NoKeywords: $
+//======================================================================================//
+
+#ifndef _FUNC_PORTAL_ORIENTATION_H_
+#define _FUNC_PORTAL_ORIENTATION_H_
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "cbase.h"
+
+class CFuncPortalOrientation : public CBaseEntity
+{
+public:
+ DECLARE_CLASS( CFuncPortalOrientation, CBaseEntity );
+ DECLARE_DATADESC();
+
+ CFuncPortalOrientation();
+ ~CFuncPortalOrientation();
+
+ // Overloads from base entity
+ virtual void Spawn( void );
+
+ void OnActivate ( void );
+
+ // Inputs to flip functionality on and off
+ void InputEnable( inputdata_t &inputdata );
+ void InputDisable( inputdata_t &inputdata );
+
+ bool IsActive() { return !m_bDisabled; } // is this area causing portals to lock orientation
+
+ bool m_bMatchLinkedAngles;
+ QAngle m_vecAnglesToFace;
+
+ CFuncPortalOrientation *m_pNext; // Needed for the template list
+ unsigned int m_iListIndex;
+private:
+ bool m_bDisabled; // are we currently locking portal orientations
+};
+
+CFuncPortalOrientation* GetPortalOrientationVolumeList();
+
+// Upon portal placement, test for orientation changing volumes
+bool UTIL_TestForOrientationVolumes( QAngle& vecCurAngles, const Vector& vecCurOrigin, const CProp_Portal* pPortal );
+
+#endif //_FUNC_PORTAL_ORIENTATION_H_ \ No newline at end of file