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/ai_behavior_rappel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/ai_behavior_rappel.h')
| -rw-r--r-- | game/server/ai_behavior_rappel.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/game/server/ai_behavior_rappel.h b/game/server/ai_behavior_rappel.h new file mode 100644 index 0000000..ee16fc6 --- /dev/null +++ b/game/server/ai_behavior_rappel.h @@ -0,0 +1,93 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: Deal with weapon being out +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// + + +#ifndef AI_BEHAVIOR_RAPPEL_H +#define AI_BEHAVIOR_RAPPEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include "ai_behavior.h" + +class CBeam; + +class CAI_RappelBehavior : public CAI_SimpleBehavior +{ + DECLARE_CLASS( CAI_RappelBehavior, CAI_SimpleBehavior ); + +public: + CAI_RappelBehavior(); + + void Precache( void ); + virtual const char *GetName() { return "Rappel"; } + + virtual bool KeyValue( const char *szKeyName, const char *szValue ); + + virtual bool CanSelectSchedule(); + void GatherConditions(); + void CleanupOnDeath( CBaseEntity *pCulprit = NULL, bool bFireDeathOutput = true ); + + //virtual void BeginScheduleSelection(); + //virtual void EndScheduleSelection(); + + void StartTask( const Task_t *pTask ); + void RunTask( const Task_t *pTask ); + + bool IsWaitingToRappel() { return m_bWaitingToRappel; } + void BeginRappel(); + void SetDescentSpeed(); + + void CreateZipline(); + void CutZipline(); + + //void BuildScheduleTestBits(); + //int TranslateSchedule( int scheduleType ); + //void OnStartSchedule( int scheduleType ); + + //void InitializeBehavior(); + + enum + { + SCHED_RAPPEL_WAIT = BaseClass::NEXT_SCHEDULE, + SCHED_RAPPEL, + SCHED_CLEAR_RAPPEL_POINT, // Get out of the way for the next guy + NEXT_SCHEDULE, + + TASK_RAPPEL = BaseClass::NEXT_TASK, + TASK_HIT_GROUND, + NEXT_TASK, + + COND_BEGIN_RAPPEL = BaseClass::NEXT_CONDITION, + NEXT_CONDITION, + }; + + DEFINE_CUSTOM_SCHEDULE_PROVIDER; + +public: + +private: + virtual int SelectSchedule(); + + //--------------------------------- + bool m_bWaitingToRappel; + bool m_bOnGround; + CHandle<CBeam> m_hLine; + Vector m_vecRopeAnchor; + + DECLARE_DATADESC(); +}; + +#endif // AI_BEHAVIOR_RAPPEL_H + + |