summaryrefslogtreecommitdiff
path: root/game/server/tf2/tf_shield_flat.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/tf2/tf_shield_flat.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/tf2/tf_shield_flat.h')
-rw-r--r--game/server/tf2/tf_shield_flat.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/game/server/tf2/tf_shield_flat.h b/game/server/tf2/tf_shield_flat.h
new file mode 100644
index 0000000..c107db4
--- /dev/null
+++ b/game/server/tf2/tf_shield_flat.h
@@ -0,0 +1,68 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef TF_SHIELD_FLAT_H
+#define TF_SHIELD_FLAT_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tf_shield.h"
+#include "mathlib/vector.h"
+
+//-----------------------------------------------------------------------------
+//
+// This is the shield projected by the grenade
+//
+//-----------------------------------------------------------------------------
+
+class CShieldFlat : public CShield
+{
+ DECLARE_CLASS( CShieldFlat, CShield );
+ DECLARE_SERVERCLASS();
+
+public:
+ void SetSize( float w, float h );
+
+ virtual void Spawn( void );
+
+ virtual void SetEMPed( bool isEmped );
+
+ void Activate( bool active );
+
+ virtual int Width() { return 2; }
+ virtual int Height() { return 2; }
+ virtual bool IsPanelActive( int x, int y ) { return true; }
+ virtual const Vector& GetPoint( int x, int y );
+ virtual void ComputeWorldSpaceSurroundingBox( Vector *pWorldMins, Vector *pWorldMaxs );
+
+public:
+ // Think methods
+ void ShieldMoved();
+
+public:
+
+ // networked data
+ CNetworkVar( unsigned char, m_ShieldState );
+ CNetworkVar( float, m_Width );
+ CNetworkVar( float, m_Height );
+
+private:
+ QAngle m_LastAngles;
+ Vector m_LastPosition;
+ Vector m_Pos[4];
+};
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Create a mobile version of the shield
+//-----------------------------------------------------------------------------
+
+CShieldFlat* CreateFlatShield( CBaseEntity *pOwner, float w, float h, const Vector& relOrigin, const QAngle &relAngles );
+
+#endif TF_SHIELD_FLAT_H \ No newline at end of file