summaryrefslogtreecommitdiff
path: root/game/client/cstrike/c_plantedc4.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/cstrike/c_plantedc4.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/cstrike/c_plantedc4.h')
-rw-r--r--game/client/cstrike/c_plantedc4.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/game/client/cstrike/c_plantedc4.h b/game/client/cstrike/c_plantedc4.h
new file mode 100644
index 0000000..b5ae7c7
--- /dev/null
+++ b/game/client/cstrike/c_plantedc4.h
@@ -0,0 +1,73 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+#ifndef C_PLANTEDC4_H
+#define C_PLANTEDC4_H
+
+#include "cbase.h"
+#include "in_buttons.h"
+#include "decals.h"
+
+#include "c_cs_player.h"
+
+#include "utlvector.h"
+
+// ------------------------------------------------------------------------------------------ //
+// CPlantedC4 class.
+// For now to show the planted c4 on the radar - client proxy to remove the CBaseAnimating
+// network vars?
+// ------------------------------------------------------------------------------------------ //
+
+class C_PlantedC4 : public C_BaseAnimating
+{
+public:
+ DECLARE_CLASS( C_PlantedC4, CBaseAnimating );
+ DECLARE_CLIENTCLASS();
+
+ C_PlantedC4();
+ virtual ~C_PlantedC4();
+
+ void Explode( void );
+ void Spawn( void );
+ virtual void SetDormant( bool bDormant );
+
+ void ClientThink( void );
+
+ int GetSecondsRemaining( void ) { return ceil( m_flC4Blow - gpGlobals->curtime ); }
+
+ inline bool IsBombActive( void ) { return m_bBombTicking; }
+ CNetworkVar( bool, m_bBombTicking );
+
+ float m_flNextGlow;
+ float m_flNextBeep;
+
+ float m_flC4Blow;
+ float m_flTimerLength;
+
+ CNetworkVar( float, m_flDefuseLength );
+ CNetworkVar( float, m_flDefuseCountDown );
+
+ float GetDefuseProgress( void )
+ {
+ float flProgress = 1.0f;
+
+ if( m_flDefuseLength > 0.0 )
+ {
+ flProgress = ( ( m_flDefuseCountDown - gpGlobals->curtime ) / m_flDefuseLength );
+ }
+
+ return flProgress;
+ }
+
+ float m_flNextRadarFlashTime; // next time to change flash state
+ bool m_bRadarFlash; // is the flash on or off
+ CNewParticleEffect *m_pC4Explosion; // client side explosion particle effect for the bomb
+};
+
+extern CUtlVector< C_PlantedC4* > g_PlantedC4s;
+
+#endif //C_PLANTEDC4_H \ No newline at end of file