summaryrefslogtreecommitdiff
path: root/game/server/tf2/tf_obj_resourcepump.h
diff options
context:
space:
mode:
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