forked from JACoders/OpenJK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbg_weapons.h
112 lines (82 loc) · 2.43 KB
/
bg_weapons.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Filename:- bg_weapons.h
//
// This crosses both client and server. It could all be crammed into bg_public, but isolation of this type of data is best.
#ifndef __WEAPONS_H__
#define __WEAPONS_H__
typedef enum {
WP_NONE,
WP_STUN_BATON,
WP_MELEE,
WP_SABER,
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_CONCUSSION,
WP_BRYAR_OLD,
WP_EMPLACED_GUN,
WP_TURRET,
// WP_GAUNTLET,
// WP_MACHINEGUN, // Bryar
// WP_SHOTGUN, // Blaster
// WP_GRENADE_LAUNCHER, // Thermal
// WP_LIGHTNING, //
// WP_RAILGUN, //
// WP_GRAPPLING_HOOK,
WP_NUM_WEAPONS
} weapon_t;
//anything > this will be considered not player useable
#define LAST_USEABLE_WEAPON WP_BRYAR_OLD
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
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
int chargeSubTime; // ms interval for subtracting ammo during charge
int altChargeSubTime; // above for secondary
int chargeSub; // amount to subtract during charge on each interval
int altChargeSub; // above for secondary
int maxCharge; // stop subtracting once charged for this many ms
int altMaxCharge; // above for secondary
} 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;
extern weaponData_t weaponData[WP_NUM_WEAPONS];
extern ammoData_t ammoData[AMMO_MAX];
// Specific weapon information
#define FIRST_WEAPON WP_BRYAR_PISTOL // this is the first weapon for next and prev weapon switching
#define MAX_PLAYER_WEAPONS WP_NUM_WEAPONS-1 // this is the max you can switch to and get with the give all.
#define DEFAULT_SHOTGUN_SPREAD 700
#define DEFAULT_SHOTGUN_COUNT 11
#define LIGHTNING_RANGE 768
#endif//#ifndef __WEAPONS_H__