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.

92 lines
2.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. //=============================================================================//
  4. #ifndef AI_HULL_H
  5. #define AI_HULL_H
  6. #pragma once
  7. class Vector;
  8. //=========================================================
  9. // Link Properties. These hulls must correspond to the hulls
  10. // in AI_Hull.cpp!
  11. //=========================================================
  12. enum Hull_t
  13. {
  14. HULL_HUMAN, // Combine, Stalker, Zombie...
  15. HULL_SMALL_CENTERED, // Scanner
  16. HULL_WIDE_HUMAN, // Vortigaunt
  17. HULL_TINY, // Headcrab
  18. HULL_WIDE_SHORT, // Bullsquid
  19. HULL_MEDIUM, // Cremator
  20. HULL_TINY_CENTERED, // Manhack
  21. HULL_LARGE, // Antlion Guard
  22. HULL_LARGE_CENTERED, // Mortar Synth
  23. //--DONT_DROP flag splits hulls here
  24. HULL_MEDIUM_TALL, // Hunter
  25. HULL_TINY_FLUID, // Blob
  26. HULL_MEDIUMBIG, // Infested drone
  27. //--------------------------------------------
  28. NUM_HULLS,
  29. HULL_NONE // No Hull (appears after num hulls as we don't want to count it)
  30. };
  31. enum Hull_Bits_t
  32. {
  33. bits_HUMAN_HULL = 0x00000001,
  34. bits_SMALL_CENTERED_HULL = 0x00000002,
  35. bits_WIDE_HUMAN_HULL = 0x00000004,
  36. bits_TINY_HULL = 0x00000008,
  37. bits_WIDE_SHORT_HULL = 0x00000010,
  38. bits_MEDIUM_HULL = 0x00000020,
  39. bits_TINY_CENTERED_HULL = 0x00000040,
  40. bits_LARGE_HULL = 0x00000080,
  41. bits_LARGE_CENTERED_HULL = 0x00000100,
  42. bits_DONT_DROP_PLACEHOLDER = 0x00000200,
  43. bits_MEDIUM_TALL_HULL = 0x00000400,
  44. bits_TINY_FLUID_HULL = 0x00000800,
  45. bits_MEDIUMBIG_HULL = 0x00001000,
  46. bits_HULL_BITS_MASK = 0x00001fff, // infested change from 1ff to fff
  47. };
  48. inline int HullToBit( Hull_t hull )
  49. {
  50. if ( hull < HULL_MEDIUM_TALL )
  51. {
  52. // Hull is before where don't drop flag splits the hull flags
  53. return ( 1 << hull );
  54. }
  55. else
  56. {
  57. // Skip over the extra flag taken by don't drop
  58. return ( 1 << ( hull + 1 ) );
  59. }
  60. }
  61. //=============================================================================
  62. // >> CAI_Hull
  63. //=============================================================================
  64. namespace NAI_Hull
  65. {
  66. const Vector &Mins(int id);
  67. const Vector &Maxs(int id);
  68. const Vector &SmallMins(int id);
  69. const Vector &SmallMaxs(int id);
  70. float Length(int id);
  71. float Width(int id);
  72. float Height(int id);
  73. int Bits(int id);
  74. const char* Name(int id);
  75. unsigned int TraceMask(int id);
  76. Hull_t LookupId(const char *szName);
  77. };
  78. #endif // AI_HULL_H