summaryrefslogtreecommitdiff
path: root/game/server/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.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/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.h')
-rw-r--r--game/server/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/game/server/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.h b/game/server/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.h
new file mode 100644
index 0000000..dc19cdf
--- /dev/null
+++ b/game/server/tf/halloween/merasmus/merasmus_behavior/merasmus_attack.h
@@ -0,0 +1,63 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+//
+//
+//=============================================================================
+#ifndef MERASMUS_ATTACK_H
+#define MERASMUS_ATTACK_H
+
+//---------------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------
+class CMerasmusAttack : public Action< CMerasmus >
+{
+public:
+ virtual ActionResult< CMerasmus > OnStart( CMerasmus *me, Action< CMerasmus > *priorAction );
+ virtual ActionResult< CMerasmus > Update( CMerasmus *me, float interval );
+
+ virtual EventDesiredResult< CMerasmus > OnStuck( CMerasmus *me );
+ virtual EventDesiredResult< CMerasmus > OnContact( CMerasmus *me, CBaseEntity *other, CGameTrace *result = NULL );
+
+ virtual const char *GetName( void ) const { return "Attack"; } // return name of this action
+
+private:
+ PathFollower m_path;
+
+ Vector m_homePos;
+ CountdownTimer m_homePosRecalcTimer;
+ void RecomputeHomePosition( void );
+
+ CountdownTimer m_attackTimer;
+
+ CountdownTimer m_grenadeTimer;
+ void RandomGrenadeTimer();
+
+ CountdownTimer m_zapTimer;
+ void RandomZapTimer();
+
+ CountdownTimer m_bombHeadTimer;
+ CountdownTimer m_tauntTimer;
+
+ CHandle< CTFPlayer > m_attackTarget; // the victim I'm momentarily attacking
+ CountdownTimer m_attackTargetFocusTimer;
+ bool IsPotentiallyChaseable( CMerasmus *me, CTFPlayer *victim );
+ void SelectVictim( CMerasmus *me );
+};
+
+
+
+//---------------------------------------------------------------------------------------------
+class CMerasmusTaunt : public Action< CMerasmus >
+{
+public:
+ virtual ActionResult< CMerasmus > OnStart( CMerasmus *me, Action< CMerasmus > *priorAction );
+ virtual ActionResult< CMerasmus > Update( CMerasmus *me, float interval );
+ virtual void OnEnd( CMerasmus *me, Action< CMerasmus > *nextAction );
+
+ virtual const char *GetName( void ) const { return "Taunt"; } // return name of this action
+
+private:
+ CountdownTimer m_timer;
+};
+
+
+#endif // MERASMUS_ATTACK_H