summaryrefslogtreecommitdiff
path: root/game/server/tf2/tf_obj_resourcepump.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_obj_resourcepump.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_obj_resourcepump.h')
-rw-r--r--game/server/tf2/tf_obj_resourcepump.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/game/server/tf2/tf_obj_resourcepump.h b/game/server/tf2/tf_obj_resourcepump.h
new file mode 100644
index 0000000..83229fc
--- /dev/null
+++ b/game/server/tf2/tf_obj_resourcepump.h
@@ -0,0 +1,60 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Resource pump
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef TF_OBJ_RESOURCEPUMP_H
+#define TF_OBJ_RESOURCEPUMP_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "tf_obj.h"
+
+
+class CResourceZone;
+
+// ------------------------------------------------------------------------ //
+// Pump defines
+#define RESOURCEPUMP_MINS Vector(-20, -20, 0)
+#define RESOURCEPUMP_MAXS Vector( 20, 20, 140)
+
+// ------------------------------------------------------------------------ //
+// Resupply object that's built by the player
+// ------------------------------------------------------------------------ //
+class CObjectResourcePump : public CBaseObject
+{
+DECLARE_CLASS( CObjectResourcePump, CBaseObject );
+
+public:
+ DECLARE_DATADESC();
+ DECLARE_SERVERCLASS();
+
+ static CObjectResourcePump* Create(const Vector &vOrigin, const QAngle &vAngles);
+
+ CObjectResourcePump();
+
+ virtual void Spawn();
+ virtual void Activate( void );
+ virtual void GetControlPanelInfo( int nPanelIndex, const char *&pPanelName );
+ virtual void FinishedBuilding( void );
+ void SetupPump( void );
+ virtual void Precache();
+ virtual bool CanTakeEMPDamage( void ) { return true; }
+
+ virtual void ResourcePumpThink( void );
+ virtual bool ClientCommand( CBaseTFPlayer *pPlayer, const CCommand &args );
+ virtual void SetupTeamModel( void );
+
+ // Gets the resource zone (may be NULL!)
+ CResourceZone* GetResourceZone();
+
+private:
+ float m_flPumpSpeed;
+ CNetworkVar( int, m_iPumpLevel );
+};
+
+#endif // TF_OBJ_RESOURCEPUMP_H