codemp/game/bg_weapons.h

Go to the documentation of this file.
00001 // Filename:-   bg_weapons.h
00002 //
00003 // This crosses both client and server.  It could all be crammed into bg_public, but isolation of this type of data is best.
00004 
00005 #ifndef __WEAPONS_H__
00006 #define __WEAPONS_H__
00007 
00008 typedef enum {
00009         WP_NONE,
00010 
00011         WP_STUN_BATON,
00012         WP_MELEE,
00013         WP_SABER,
00014         WP_BRYAR_PISTOL,
00015         WP_BLASTER,
00016         WP_DISRUPTOR,
00017         WP_BOWCASTER,
00018         WP_REPEATER,
00019         WP_DEMP2,
00020         WP_FLECHETTE,
00021         WP_ROCKET_LAUNCHER,
00022         WP_THERMAL,
00023         WP_TRIP_MINE,
00024         WP_DET_PACK,
00025         WP_CONCUSSION,
00026         WP_BRYAR_OLD,
00027         WP_EMPLACED_GUN,
00028         WP_TURRET,
00029 
00030 //      WP_GAUNTLET,
00031 //      WP_MACHINEGUN,                  // Bryar
00032 //      WP_SHOTGUN,                             // Blaster
00033 //      WP_GRENADE_LAUNCHER,    // Thermal
00034 //      WP_LIGHTNING,                   // 
00035 //      WP_RAILGUN,                             // 
00036 //      WP_GRAPPLING_HOOK,
00037 
00038         WP_NUM_WEAPONS
00039 };
00040 typedef int weapon_t;
00041 
00042 //anything > this will be considered not player useable
00043 #define LAST_USEABLE_WEAPON                     WP_BRYAR_OLD
00044 
00045 typedef enum //# ammo_e
00046 {
00047         AMMO_NONE,
00048         AMMO_FORCE,             // AMMO_PHASER
00049         AMMO_BLASTER,   // AMMO_STARFLEET,
00050         AMMO_POWERCELL, // AMMO_ALIEN,
00051         AMMO_METAL_BOLTS,
00052         AMMO_ROCKETS,
00053         AMMO_EMPLACED,
00054         AMMO_THERMAL,
00055         AMMO_TRIPMINE,
00056         AMMO_DETPACK,
00057         AMMO_MAX
00058 } ammo_t;
00059 
00060 
00061 typedef struct weaponData_s
00062 {
00063 //      char    classname[32];          // Spawning name
00064 
00065         int             ammoIndex;                      // Index to proper ammo slot
00066         int             ammoLow;                        // Count when ammo is low
00067 
00068         int             energyPerShot;          // Amount of energy used per shot
00069         int             fireTime;                       // Amount of time between firings
00070         int             range;                          // Range of weapon
00071         
00072         int             altEnergyPerShot;       // Amount of energy used for alt-fire
00073         int             altFireTime;            // Amount of time between alt-firings
00074         int             altRange;                       // Range of alt-fire
00075 
00076         int             chargeSubTime;          // ms interval for subtracting ammo during charge
00077         int             altChargeSubTime;       // above for secondary
00078 
00079         int             chargeSub;                      // amount to subtract during charge on each interval
00080         int             altChargeSub;           // above for secondary
00081 
00082         int             maxCharge;                      // stop subtracting once charged for this many ms
00083         int             altMaxCharge;           // above for secondary
00084 } weaponData_t;
00085 
00086 
00087 typedef struct  ammoData_s
00088 {
00089 //      char    icon[32];       // Name of ammo icon file
00090         int             max;            // Max amount player can hold of ammo
00091 } ammoData_t;
00092 
00093 
00094 extern weaponData_t weaponData[WP_NUM_WEAPONS];
00095 extern ammoData_t ammoData[AMMO_MAX];
00096 
00097 
00098 // Specific weapon information
00099 
00100 #define FIRST_WEAPON            WP_BRYAR_PISTOL         // this is the first weapon for next and prev weapon switching
00101 #define MAX_PLAYER_WEAPONS      WP_NUM_WEAPONS-1        // this is the max you can switch to and get with the give all.
00102 
00103 
00104 #define DEFAULT_SHOTGUN_SPREAD  700
00105 #define DEFAULT_SHOTGUN_COUNT   11
00106 
00107 #define LIGHTNING_RANGE         768
00108 
00109 
00110 
00111 
00112 
00113 #endif//#ifndef __WEAPONS_H__