summaryrefslogtreecommitdiff
path: root/game/client/portal/c_prop_portal.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/client/portal/c_prop_portal.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/portal/c_prop_portal.h')
-rw-r--r--game/client/portal/c_prop_portal.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/game/client/portal/c_prop_portal.h b/game/client/portal/c_prop_portal.h
new file mode 100644
index 0000000..f5871f4
--- /dev/null
+++ b/game/client/portal/c_prop_portal.h
@@ -0,0 +1,96 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef C_PROP_PORTAL_H
+#define C_PROP_PORTAL_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "portalrenderable_flatbasic.h"
+#include "iviewrender.h"
+#include "view_shared.h"
+#include "viewrender.h"
+#include "PortalSimulation.h"
+#include "C_PortalGhostRenderable.h"
+
+struct dlight_t;
+class C_DynamicLight;
+
+class C_Prop_Portal : public CPortalRenderable_FlatBasic
+{
+public:
+ DECLARE_CLASS( C_Prop_Portal, CPortalRenderable_FlatBasic );
+ DECLARE_CLIENTCLASS();
+
+ C_Prop_Portal( void );
+ virtual ~C_Prop_Portal( void );
+
+ // Handle recording for the SFM
+ virtual void GetToolRecordingState( KeyValues *msg );
+
+ CHandle<C_Prop_Portal> m_hLinkedPortal; //the portal this portal is linked to
+ bool m_bActivated; //a portal can exist and not be active
+
+ bool m_bSharedEnvironmentConfiguration; //this will be set by an instance of CPortal_Environment when two environments are in close proximity
+
+ cplane_t m_plane_Origin; // The plane on which this portal is placed, normal facing outward (matching model forward vec)
+
+ virtual void Spawn( void );
+ virtual void Activate( void );
+ virtual void ClientThink( void );
+
+ virtual void Simulate();
+
+ virtual void UpdateOnRemove( void );
+
+ virtual void OnNewParticleEffect( const char *pszParticleName, CNewParticleEffect *pNewParticleEffect );
+
+ struct Portal_PreDataChanged
+ {
+ bool m_bActivated;
+ bool m_bIsPortal2;
+ Vector m_vOrigin;
+ QAngle m_qAngles;
+ EHANDLE m_hLinkedTo;
+ } PreDataChanged;
+
+ struct TransformedLightingData_t
+ {
+ ClientShadowHandle_t m_LightShadowHandle;
+ dlight_t *m_pEntityLight;
+ } TransformedLighting;
+
+ virtual void OnPreDataChanged( DataUpdateType_t updateType );
+ virtual void OnDataChanged( DataUpdateType_t updateType );
+ virtual int DrawModel( int flags );
+ void UpdateOriginPlane( void );
+ void UpdateGhostRenderables( void );
+
+ void SetIsPortal2( bool bValue );
+
+ bool IsActivedAndLinked( void ) const;
+
+ CPortalSimulator m_PortalSimulator;
+
+ virtual C_BaseEntity * PortalRenderable_GetPairedEntity( void ) { return this; };
+
+private:
+
+ CUtlVector<EHANDLE> m_hGhostingEntities;
+ CUtlVector<C_PortalGhostRenderable *> m_GhostRenderables;
+ float m_fGhostRenderablesClip[4];
+
+
+ friend void __MsgFunc_EntityPortalled(bf_read &msg);
+
+};
+
+typedef C_Prop_Portal CProp_Portal;
+
+#endif //#ifndef C_PROP_PORTAL_H