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.

123 lines
3.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: The default shared conditions
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef CONDITION_H
  14. #define CONDITION_H
  15. // NOTE: Changing this constant will break save files!!! (changes type of CAI_ScheduleBits)
  16. #ifndef MAX_CONDITIONS
  17. #define MAX_CONDITIONS 32*8
  18. #endif
  19. //=========================================================
  20. // These are the default shared conditions
  21. //=========================================================
  22. enum SCOND_t
  23. {
  24. COND_NONE, // A way for a function to return no condition to get
  25. COND_IN_PVS,
  26. COND_IDLE_INTERRUPT, // The schedule in question is a low priority idle, and therefore a candidate for translation into something else
  27. COND_LOW_PRIMARY_AMMO,
  28. COND_NO_PRIMARY_AMMO,
  29. COND_NO_SECONDARY_AMMO,
  30. COND_NO_WEAPON,
  31. COND_SEE_HATE,
  32. COND_SEE_FEAR,
  33. COND_SEE_DISLIKE,
  34. COND_SEE_ENEMY,
  35. COND_LOST_ENEMY,
  36. COND_ENEMY_WENT_NULL, // What most people think COND_LOST_ENEMY is: This condition is set in the edge case where you had an enemy last think, but don't have one this think.
  37. COND_ENEMY_OCCLUDED, // Can't see m_hEnemy
  38. COND_TARGET_OCCLUDED, // Can't see m_hTargetEnt
  39. COND_HAVE_ENEMY_LOS,
  40. COND_HAVE_TARGET_LOS,
  41. COND_LIGHT_DAMAGE,
  42. COND_HEAVY_DAMAGE,
  43. COND_PHYSICS_DAMAGE,
  44. COND_REPEATED_DAMAGE, // Damaged several times in a row
  45. COND_CAN_RANGE_ATTACK1, // Hitscan weapon only
  46. COND_CAN_RANGE_ATTACK2, // Grenade weapon only
  47. COND_CAN_MELEE_ATTACK1,
  48. COND_CAN_MELEE_ATTACK2,
  49. COND_PROVOKED,
  50. COND_NEW_ENEMY,
  51. COND_ENEMY_TOO_FAR, // Can we get rid of this one!?!?
  52. COND_ENEMY_FACING_ME,
  53. COND_BEHIND_ENEMY,
  54. COND_ENEMY_DEAD,
  55. COND_ENEMY_UNREACHABLE, // Not connected to me via node graph
  56. COND_SEE_PLAYER,
  57. COND_LOST_PLAYER,
  58. COND_SEE_NEMESIS,
  59. COND_TASK_FAILED,
  60. COND_SCHEDULE_DONE,
  61. COND_SMELL,
  62. COND_TOO_CLOSE_TO_ATTACK, // FIXME: most of this next group are meaningless since they're shared between all attack checks!
  63. COND_TOO_FAR_TO_ATTACK,
  64. COND_NOT_FACING_ATTACK,
  65. COND_WEAPON_HAS_LOS,
  66. COND_WEAPON_BLOCKED_BY_FRIEND, // Friend between weapon and target
  67. COND_WEAPON_PLAYER_IN_SPREAD, // Player in shooting direction
  68. COND_WEAPON_PLAYER_NEAR_TARGET, // Player near shooting position
  69. COND_WEAPON_SIGHT_OCCLUDED,
  70. COND_BETTER_WEAPON_AVAILABLE,
  71. COND_HEALTH_ITEM_AVAILABLE, // There's a healthkit available.
  72. COND_GIVE_WAY, // Another npc requested that I give way
  73. COND_WAY_CLEAR, // I no longer have to give way
  74. COND_HEAR_DANGER,
  75. COND_HEAR_THUMPER,
  76. COND_HEAR_BUGBAIT,
  77. COND_HEAR_COMBAT,
  78. COND_HEAR_WORLD,
  79. COND_HEAR_PLAYER,
  80. COND_HEAR_BULLET_IMPACT,
  81. COND_HEAR_PHYSICS_DANGER,
  82. COND_HEAR_MOVE_AWAY,
  83. COND_HEAR_SPOOKY, // Zombies make this when Alyx is in darkness mode
  84. COND_NO_HEAR_DANGER, // Since we can't use ~CONDITION. Mutually exclusive with COND_HEAR_DANGER
  85. COND_FLOATING_OFF_GROUND,
  86. COND_MOBBED_BY_ENEMIES, // Surrounded by a large number of enemies melee attacking me. (Zombies or Antlions, usually).
  87. // Commander stuff
  88. COND_RECEIVED_ORDERS,
  89. COND_PLAYER_ADDED_TO_SQUAD,
  90. COND_PLAYER_REMOVED_FROM_SQUAD,
  91. COND_PLAYER_PUSHING,
  92. COND_NPC_FREEZE, // We received an npc_freeze command while we were unfrozen
  93. COND_NPC_UNFREEZE, // We received an npc_freeze command while we were frozen
  94. // This is a talker condition, but done here because we need to handle it in base AI
  95. // due to it's interaction with behaviors.
  96. COND_TALKER_RESPOND_TO_QUESTION,
  97. COND_NO_CUSTOM_INTERRUPTS, // Don't call BuildScheduleTestBits for this schedule. Used for schedules that must strictly control their interruptibility.
  98. COND_BEHAVIOR_PARAMETERS_CHANGED,
  99. // ======================================
  100. // IMPORTANT: This must be the last enum
  101. // ======================================
  102. LAST_SHARED_CONDITION
  103. };
  104. #endif //CONDITION_H