summaryrefslogtreecommitdiff
path: root/game/server/tfc/tfc_timer.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/tfc/tfc_timer.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/tfc/tfc_timer.h')
-rw-r--r--game/server/tfc/tfc_timer.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/game/server/tfc/tfc_timer.h b/game/server/tfc/tfc_timer.h
new file mode 100644
index 0000000..156eb10
--- /dev/null
+++ b/game/server/tfc/tfc_timer.h
@@ -0,0 +1,60 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef TFC_TIMER_H
+#define TFC_TIMER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "ehandle.h"
+#include "tfc_shareddefs.h"
+
+
+class CTFCPlayer;
+
+
+class CTimer
+{
+public:
+ CTimer();
+
+ int GetTeamNumber() const;
+
+public:
+ EHANDLE m_hOwner;
+ EHANDLE m_hEnemy;
+ TFCTimer_t m_Type; // One of the TF_TIMER_ defines.
+ int m_iTeamNumber;
+ float m_flNextThink;
+ int weapon; // GI_RET_ define.
+
+ // For g_Timers.
+ int m_iListIndex;
+};
+
+
+// This stuff replaces the functions like CBaseEntity::FindTimer, CBaseEntity::CreateTimer,
+// and all the timer handlers in TFC.
+
+// Find an active timer on the specified entity.
+CTimer* Timer_FindTimer( CBaseEntity *pPlayer, TFCTimer_t timerType );
+
+// Create a new timer.
+CTimer* Timer_CreateTimer( CBaseEntity *pPlayer, TFCTimer_t timerType );
+
+// Get rid of a timer.
+void Timer_Remove( CTimer *pTimer );
+
+// Update all timers.
+void Timer_UpdateAll();
+
+// Call at round restart.
+void Timer_RemoveAll();
+
+
+#endif // TFC_TIMER_H