Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Deal with weapon being out
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef AI_BEHAVIOR_RAPPEL_H
  14. #define AI_BEHAVIOR_RAPPEL_H
  15. #ifdef _WIN32
  16. #pragma once
  17. #endif
  18. #include "ai_behavior.h"
  19. class CBeam;
  20. class CAI_RappelBehavior : public CAI_SimpleBehavior
  21. {
  22. DECLARE_CLASS( CAI_RappelBehavior, CAI_SimpleBehavior );
  23. public:
  24. CAI_RappelBehavior();
  25. void Precache( void );
  26. virtual const char *GetName() { return "Rappel"; }
  27. virtual bool KeyValue( const char *szKeyName, const char *szValue );
  28. virtual bool CanSelectSchedule();
  29. void GatherConditions();
  30. void CleanupOnDeath( CBaseEntity *pCulprit = NULL, bool bFireDeathOutput = true );
  31. //virtual void BeginScheduleSelection();
  32. //virtual void EndScheduleSelection();
  33. void StartTask( const Task_t *pTask );
  34. void RunTask( const Task_t *pTask );
  35. bool IsWaitingToRappel() { return m_bWaitingToRappel; }
  36. void BeginRappel();
  37. void SetDescentSpeed();
  38. void CreateZipline();
  39. void CutZipline();
  40. //void BuildScheduleTestBits();
  41. //int TranslateSchedule( int scheduleType );
  42. //void OnStartSchedule( int scheduleType );
  43. //void InitializeBehavior();
  44. enum
  45. {
  46. SCHED_RAPPEL_WAIT = BaseClass::NEXT_SCHEDULE,
  47. SCHED_RAPPEL,
  48. SCHED_CLEAR_RAPPEL_POINT, // Get out of the way for the next guy
  49. NEXT_SCHEDULE,
  50. TASK_RAPPEL = BaseClass::NEXT_TASK,
  51. TASK_HIT_GROUND,
  52. NEXT_TASK,
  53. COND_BEGIN_RAPPEL = BaseClass::NEXT_CONDITION,
  54. NEXT_CONDITION,
  55. };
  56. DEFINE_CUSTOM_SCHEDULE_PROVIDER;
  57. public:
  58. private:
  59. virtual int SelectSchedule();
  60. //---------------------------------
  61. bool m_bWaitingToRappel;
  62. bool m_bOnGround;
  63. CHandle<CBeam> m_hLine;
  64. Vector m_vecRopeAnchor;
  65. DECLARE_DATADESC();
  66. };
  67. #endif // AI_BEHAVIOR_RAPPEL_H