jedioutcast/code/game/weapons.h
2013-04-04 16:05:53 -05:00

149 lines
4 KiB
C

// Filename:- weapons.h
//
// Note that this is now included from both server and game modules, so don't include any other header files
// within this one that might break stuff...
#ifndef __WEAPONS_H__
#define __WEAPONS_H__
typedef enum //# weapon_e
{
WP_NONE,
// Player weapons
WP_SABER, // NOTE: lots of code assumes this is the first weapon (... which is crap) so be careful -Ste.
WP_BRYAR_PISTOL,
WP_BLASTER,
WP_DISRUPTOR,
WP_BOWCASTER,
WP_REPEATER,
WP_DEMP2,
WP_FLECHETTE,
WP_ROCKET_LAUNCHER,
WP_THERMAL,
WP_TRIP_MINE,
WP_DET_PACK,
WP_STUN_BATON,
//NOTE: player can only have up to 16 weapons, anything after that is enemy only
WP_MELEE, // Any ol' melee attack
// NPC enemy weapons
WP_EMPLACED_GUN,
WP_BOT_LASER, // Probe droid - Laser blast
WP_TURRET, // turret guns
WP_ATST_MAIN,
WP_ATST_SIDE,
WP_TIE_FIGHTER,
WP_RAPID_FIRE_CONC,
WP_BLASTER_PISTOL, // apparently some enemy only version of the blaster
// WP_CHAOTICA_GUARD_GUN, // - B/W version of scav rifle for Chaotica's guards.
// WP_BOT_ROCKET, // Hunter Seeker - Rocket projectile
// WP_KLINGON_BLADE,
// WP_IMPERIAL_BLADE,
// WP_DESPERADO, // special holo-weapon
// WP_PALADIN, // special holo-weapon
//# #eol
WP_NUM_WEAPONS
} weapon_t;
#define FIRST_WEAPON WP_SABER // this is the first weapon for next and prev weapon switching
#define MAX_PLAYER_WEAPONS WP_STUN_BATON // this is the max you can switch to and get with the give all.
// AMMO_NONE must be first and AMMO_MAX must be last, cause weapon load validates based off of these vals
typedef enum //# ammo_e
{
AMMO_NONE,
AMMO_FORCE, // AMMO_PHASER
AMMO_BLASTER, // AMMO_STARFLEET,
AMMO_POWERCELL, // AMMO_ALIEN,
AMMO_METAL_BOLTS,
AMMO_ROCKETS,
AMMO_EMPLACED,
AMMO_THERMAL,
AMMO_TRIPMINE,
AMMO_DETPACK,
AMMO_MAX
} ammo_t;
typedef struct weaponData_s
{
char classname[32]; // Spawning name
char weaponMdl[64]; // Weapon Model
char firingSnd[64]; // Sound made when fired
char altFiringSnd[64]; // Sound made when alt-fired
// char flashSnd[64]; // Sound made by flash
// char altFlashSnd[64]; // Sound made by an alt-flash
char stopSnd[64]; // Sound made when weapon stops firing
char chargeSnd[64]; // sound to start when the weapon initiates the charging sequence
char altChargeSnd[64]; // alt sound to start when the weapon initiates the charging sequence
char selectSnd[64]; // the sound to play when this weapon gets selected
#ifdef _IMMERSION
char firingFrc[64];
char altFiringFrc[64];
char stopFrc[64];
char chargeFrc[64];
char altChargeFrc[64];
char selectFrc[64];
#endif // _IMMERSION
int ammoIndex; // Index to proper ammo slot
int ammoLow; // Count when ammo is low
int energyPerShot; // Amount of energy used per shot
int fireTime; // Amount of time between firings
int range; // Range of weapon
int altEnergyPerShot; // Amount of energy used for alt-fire
int altFireTime; // Amount of time between alt-firings
int altRange; // Range of alt-fire
char weaponIcon[64]; // Name of weapon icon file
int numBarrels; // how many barrels should we expect for this weapon?
char missileMdl[64]; // Missile Model
char missileSound[64]; // Missile flight sound
float missileDlight; // what is says
vec3_t missileDlightColor; // ditto
char alt_missileMdl[64]; // Missile Model
char alt_missileSound[64]; // Missile sound
float alt_missileDlight; // what is says
vec3_t alt_missileDlightColor; // ditto
char missileHitSound[64]; // Missile impact sound
char altmissileHitSound[64]; // alt Missile impact sound
#ifndef _USRDLL
void *func;
void *altfunc;
char mMuzzleEffect[64];
int mMuzzleEffectID;
char mAltMuzzleEffect[64];
int mAltMuzzleEffectID;
#endif
} weaponData_t;
typedef struct ammoData_s
{
char icon[32]; // Name of ammo icon file
int max; // Max amount player can hold of ammo
} ammoData_t;
#endif//#ifndef __WEAPONS_H__