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.

64 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef SCRIPTEDTARGET_H
  8. #define SCRIPTEDTARGET_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #ifndef SCRIPTEVENT_H
  13. #include "scriptevent.h"
  14. #endif
  15. #include "ai_basenpc.h"
  16. class CScriptedTarget : public CAI_BaseNPC
  17. {
  18. DECLARE_CLASS( CScriptedTarget, CAI_BaseNPC );
  19. public:
  20. DECLARE_DATADESC();
  21. void Spawn( void );
  22. virtual int ObjectCaps( void ) { return (BaseClass::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
  23. void ScriptThink( void );
  24. CBaseEntity* FindEntity( void );
  25. void TurnOn(void);
  26. void TurnOff(void);
  27. // Input handlers
  28. void InputEnable( inputdata_t &inputdata );
  29. void InputDisable( inputdata_t &inputdata );
  30. CScriptedTarget* NextScriptedTarget(void);
  31. float MoveSpeed(void) { return m_nMoveSpeed; };
  32. float EffectDuration(void) { return m_flEffectDuration; };
  33. int DrawDebugTextOverlays(void);
  34. void DrawDebugGeometryOverlays(void);
  35. float PercentComplete(void);
  36. Vector m_vLastPosition; // Last position that's been reached
  37. private:
  38. int m_iDisabled; // Initial state
  39. string_t m_iszEntity; // entity that is wanted for this script
  40. float m_flRadius; // range to search
  41. int m_nMoveSpeed; // How fast do I burn from target to target
  42. float m_flPauseDuration; // How long to pause at this target
  43. float m_flPauseDoneTime; // When is pause over
  44. float m_flEffectDuration; // How long should any associated effect last?
  45. COutputEvent m_AtTarget; // Fired when scripted target has been reached
  46. COutputEvent m_LeaveTarget; // Fired when scripted target is left
  47. };
  48. #endif // SCRIPTEDTARGET_H