weapons.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. // Filename:- weapons.h
  2. //
  3. // Note that this is now included from both server and game modules, so don't include any other header files
  4. // within this one that might break stuff...
  5. #ifndef __WEAPONS_H__
  6. #define __WEAPONS_H__
  7. typedef enum //# weapon_e
  8. {
  9. WP_NONE,
  10. // Player weapons
  11. WP_SABER, // player and NPC weapon
  12. WP_BLASTER_PISTOL, // player and NPC weapon
  13. WP_BLASTER, // player and NPC weapon
  14. WP_DISRUPTOR, // player and NPC weapon
  15. WP_BOWCASTER, // NPC weapon - player can pick this up, but never starts with them
  16. WP_REPEATER, // NPC weapon - player can pick this up, but never starts with them
  17. WP_DEMP2, // NPC weapon - player can pick this up, but never starts with them
  18. WP_FLECHETTE, // NPC weapon - player can pick this up, but never starts with them
  19. WP_ROCKET_LAUNCHER, // NPC weapon - player can pick this up, but never starts with them
  20. WP_THERMAL, // player and NPC weapon
  21. WP_TRIP_MINE, // NPC weapon - player can pick this up, but never starts with them
  22. WP_DET_PACK, // NPC weapon - player can pick this up, but never starts with them
  23. WP_CONCUSSION, // NPC weapon - player can pick this up, but never starts with them
  24. //extras
  25. WP_MELEE, // player and NPC weapon - Any ol' melee attack
  26. //when in atst
  27. WP_ATST_MAIN,
  28. WP_ATST_SIDE,
  29. // These can never be gotten directly by the player
  30. WP_STUN_BATON, // stupid weapon, should remove
  31. //NPC weapons
  32. WP_BRYAR_PISTOL, // NPC weapon - player can pick this up, but never starts with them
  33. WP_EMPLACED_GUN,
  34. WP_BOT_LASER, // Probe droid - Laser blast
  35. WP_TURRET, // turret guns
  36. WP_TIE_FIGHTER,
  37. WP_RAPID_FIRE_CONC,
  38. WP_JAWA,
  39. WP_TUSKEN_RIFLE,
  40. WP_TUSKEN_STAFF,
  41. WP_SCEPTER,
  42. WP_NOGHRI_STICK,
  43. //# #eol
  44. WP_NUM_WEAPONS
  45. } weapon_t;
  46. #define FIRST_WEAPON WP_SABER // this is the first weapon for next and prev weapon switching
  47. #define MAX_PLAYER_WEAPONS WP_STUN_BATON // this is the max you can switch to and get with the give all. - FIXME: it's actually this one *minus* one... why?
  48. // AMMO_NONE must be first and AMMO_MAX must be last, cause weapon load validates based off of these vals
  49. typedef enum //# ammo_e
  50. {
  51. AMMO_NONE,
  52. AMMO_FORCE, // AMMO_PHASER
  53. AMMO_BLASTER, // AMMO_STARFLEET,
  54. AMMO_POWERCELL, // AMMO_ALIEN,
  55. AMMO_METAL_BOLTS,
  56. AMMO_ROCKETS,
  57. AMMO_EMPLACED,
  58. AMMO_THERMAL,
  59. AMMO_TRIPMINE,
  60. AMMO_DETPACK,
  61. AMMO_MAX
  62. } ammo_t;
  63. typedef struct weaponData_s
  64. {
  65. char classname[32]; // Spawning name
  66. char weaponMdl[64]; // Weapon Model
  67. char firingSnd[64]; // Sound made when fired
  68. char altFiringSnd[64]; // Sound made when alt-fired
  69. // char flashSnd[64]; // Sound made by flash
  70. // char altFlashSnd[64]; // Sound made by an alt-flash
  71. char stopSnd[64]; // Sound made when weapon stops firing
  72. char chargeSnd[64]; // sound to start when the weapon initiates the charging sequence
  73. char altChargeSnd[64]; // alt sound to start when the weapon initiates the charging sequence
  74. char selectSnd[64]; // the sound to play when this weapon gets selected
  75. #ifdef _IMMERSION
  76. char firingFrc[64];
  77. char altFiringFrc[64];
  78. char stopFrc[64];
  79. char chargeFrc[64];
  80. char altChargeFrc[64];
  81. char selectFrc[64];
  82. #endif // _IMMERSION
  83. int ammoIndex; // Index to proper ammo slot
  84. int ammoLow; // Count when ammo is low
  85. int energyPerShot; // Amount of energy used per shot
  86. int fireTime; // Amount of time between firings
  87. int range; // Range of weapon
  88. int altEnergyPerShot; // Amount of energy used for alt-fire
  89. int altFireTime; // Amount of time between alt-firings
  90. int altRange; // Range of alt-fire
  91. char weaponIcon[64]; // Name of weapon icon file
  92. int numBarrels; // how many barrels should we expect for this weapon?
  93. char missileMdl[64]; // Missile Model
  94. char missileSound[64]; // Missile flight sound
  95. float missileDlight; // what is says
  96. vec3_t missileDlightColor; // ditto
  97. char alt_missileMdl[64]; // Missile Model
  98. char alt_missileSound[64]; // Missile sound
  99. float alt_missileDlight; // what is says
  100. vec3_t alt_missileDlightColor; // ditto
  101. char missileHitSound[64]; // Missile impact sound
  102. char altmissileHitSound[64]; // alt Missile impact sound
  103. #ifndef _USRDLL
  104. void *func;
  105. void *altfunc;
  106. char mMuzzleEffect[64];
  107. int mMuzzleEffectID;
  108. char mAltMuzzleEffect[64];
  109. int mAltMuzzleEffectID;
  110. #endif
  111. } weaponData_t;
  112. typedef struct ammoData_s
  113. {
  114. char icon[32]; // Name of ammo icon file
  115. int max; // Max amount player can hold of ammo
  116. } ammoData_t;
  117. #endif//#ifndef __WEAPONS_H__