Team Fortress 2 Source Code as on 22/4/2020
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.

65 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Base combat character with no AI
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef AI_LINK_H
  14. #define AI_LINK_H
  15. #pragma once
  16. #include "ai_hull.h" // For num hulls
  17. struct edict_t;
  18. enum Link_Info_t
  19. {
  20. bits_LINK_STALE_SUGGESTED = 0x01, // NPC found this link to be blocked
  21. bits_LINK_OFF = 0x02, // This link has been turned off
  22. };
  23. //=============================================================================
  24. // >> CAI_Link
  25. //=============================================================================
  26. class CAI_DynamicLink;
  27. #define AI_MOVE_TYPE_BITS ( bits_CAP_MOVE_GROUND | bits_CAP_MOVE_JUMP | bits_CAP_MOVE_FLY | bits_CAP_MOVE_CLIMB | bits_CAP_MOVE_SWIM | bits_CAP_MOVE_CRAWL )
  28. class CAI_Link
  29. {
  30. public:
  31. short m_iSrcID; // the node that 'owns' this link
  32. short m_iDestID; // the node on the other end of the link.
  33. int DestNodeID(int srcID); // Given the source node ID, returns the destination ID
  34. byte m_iAcceptedMoveTypes[NUM_HULLS]; // Capability_T of motions acceptable for each hull type
  35. byte m_LinkInfo; // other information about this link
  36. float m_timeStaleExpires;
  37. CAI_DynamicLink *m_pDynamicLink;
  38. //edict_t *m_pLinkEnt; // the entity that blocks this connection (doors, etc)
  39. // m_szLinkEntModelname is not necessarily NULL terminated (so we can store it in a more alignment-friendly 4 bytes)
  40. //char m_szLinkEntModelname[ 4 ];// the unique name of the brush model that blocks the connection (this is kept for save/restore)
  41. //float m_flWeight; // length of the link line segment
  42. private:
  43. friend class CAI_Network;
  44. CAI_Link(void);
  45. };
  46. #endif // AI_LINK_H