summaryrefslogtreecommitdiff
path: root/game/client/tf2/c_order.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/tf2/c_order.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/tf2/c_order.h')
-rw-r--r--game/client/tf2/c_order.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/game/client/tf2/c_order.h b/game/client/tf2/c_order.h
new file mode 100644
index 0000000..b1623c8
--- /dev/null
+++ b/game/client/tf2/c_order.h
@@ -0,0 +1,73 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Client Side COrder class
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef C_ORDER_H
+#define C_ORDER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/Label.h>
+#include <vgui_controls/Panel.h>
+#include "CommanderOverlay.h"
+#include "hud_minimap.h"
+
+class COrderLabel;
+
+
+//-----------------------------------------------------------------------------
+// Purpose: Datatable container class for orders
+//-----------------------------------------------------------------------------
+class C_Order : public C_BaseEntity
+{
+ DECLARE_CLASS( C_Order, C_BaseEntity );
+public:
+ DECLARE_CLIENTCLASS();
+
+ C_Order( void );
+ ~C_Order( void );
+
+ virtual void ClientThink( void );
+ virtual void OnDataChanged( DataUpdateType_t updateType );
+ virtual void RemoveOrder( void );
+ virtual void GetDescription( char *pDest, int bufferSize );
+ virtual void GetTargetDescription( char *pDest, int bufferSize );
+
+ // Status drawing
+ virtual void CreateStatus( vgui::Panel *pParent );
+ virtual void DestroyStatus( void );
+ virtual void UpdateStatus( void );
+ virtual bool ShouldDrawReticle( void );
+
+ // Data access
+ int GetPriority( void );
+ int GetTarget( void );
+ int GetType( void );
+ bool IsPersonalOrder( void );
+
+protected:
+ // Received via datatable
+ int m_iPriority;
+ int m_iOrderType;
+ int m_iTargetEntIndex;
+
+ // Used in status drawing
+ COrderLabel *m_pNameLabel;
+
+ // Animating panel to show the new order.
+ float m_flNewOrderHighlightTimer;
+
+ // Hook up the overlay on the tactical map.
+ DECLARE_ENTITY_PANEL();
+ DECLARE_MINIMAP_PANEL();
+
+protected:
+ int m_nHintID;
+};
+
+
+#endif // C_ORDER_H