diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h')
| -rw-r--r-- | game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h b/game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h new file mode 100644 index 0000000..0364903 --- /dev/null +++ b/game/server/tf/bot/behavior/scenario/raid/tf_bot_wander.h @@ -0,0 +1,51 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// tf_bot_wander.h +// Wanderering/idle enemies for Squad Co-op mode +// Michael Booth, October 2009 + +#ifndef TF_BOT_WANDER_H +#define TF_BOT_WANDER_H + +#ifdef TF_RAID_MODE + +//----------------------------------------------------------------------------- +class CTFBotWander : public Action< CTFBot > +{ +public: + CTFBotWander( void ); + + virtual ActionResult< CTFBot > OnStart( CTFBot *me, Action< CTFBot > *priorAction ); + virtual ActionResult< CTFBot > Update( CTFBot *me, float interval ); + + virtual EventDesiredResult< CTFBot > OnContact( CTFBot *me, CBaseEntity *other, CGameTrace *result = NULL ); + virtual EventDesiredResult< CTFBot > OnInjured( CTFBot *me, const CTakeDamageInfo &info ); + virtual EventDesiredResult< CTFBot > OnOtherKilled( CTFBot *me, CBaseCombatCharacter *victim, const CTakeDamageInfo &info ); + + virtual EventDesiredResult< CTFBot > OnCommandAttack( CTFBot *me, CBaseEntity *victim ); + + virtual QueryResultType ShouldHurry( const INextBot *me ) const; // are we in a hurry? + virtual QueryResultType ShouldRetreat( const INextBot *me ) const; // is it time to retreat? + + virtual const char *GetName( void ) const { return "Wander"; }; + +private: + CountdownTimer m_visionTimer; + CountdownTimer m_vocalizeTimer; +}; + + +inline QueryResultType CTFBotWander::ShouldHurry( const INextBot *me ) const +{ + return ANSWER_YES; +} + + +inline QueryResultType CTFBotWander::ShouldRetreat( const INextBot *me ) const +{ + return ANSWER_NO; +} + + +#endif TF_RAID_MODE + +#endif // TF_BOT_WANDER_H |