1 float BOT_PICKUP_RATING_LOW = 2500;
2 float BOT_PICKUP_RATING_MID = 5000;
3 float BOT_PICKUP_RATING_HIGH = 10000;
5 float WEP_TYPE_OTHER = 0x00; // e.g: Hook, Port-o-launch, etc
6 float WEP_TYPE_SPLASH = 0x01;
7 float WEP_TYPE_HITSCAN = 0x02;
8 float WEP_TYPEMASK = 0x0F;
9 float WEP_FLAG_CANCLIMB = 0x10;
10 float WEP_FLAG_NORMAL = 0x20;
11 float WEP_FLAG_HIDDEN = 0x40;
12 float WEP_FLAG_RELOADABLE = 0x80;
13 float WEP_FLAG_SUPERWEAPON = 0x100;
15 float IT_UNLIMITED_WEAPON_AMMO = 1;
16 // when this bit is set, using a weapon does not reduce ammo. Checkpoints can give this powerup.
17 float IT_UNLIMITED_SUPERWEAPONS = 2;
18 // when this bit is set, superweapons don't expire. Checkpoints can give this powerup.
19 float IT_CTF_SHIELDED = 4; // set for the flag shield
20 float IT_USING_JETPACK = 8; // confirmation that button is pressed
21 float IT_JETPACK = 16; // actual item
22 float IT_FUEL_REGEN = 32; // fuel regeneration trigger
23 float IT_SHELLS = 256;
25 float IT_ROCKETS = 1024;
26 float IT_CELLS = 2048;
27 float IT_SUPERWEAPON = 4096;
29 float IT_STRENGTH = 8192;
30 float IT_INVINCIBLE = 16384;
31 float IT_HEALTH = 32768;
34 float IT_KEY1 = 131072;
35 float IT_KEY2 = 262144;
37 float IT_RED_FLAG_TAKEN = 32768;
38 float IT_RED_FLAG_LOST = 65536;
39 float IT_RED_FLAG_CARRING = 98304;
40 float IT_BLUE_FLAG_TAKEN = 131072;
41 float IT_BLUE_FLAG_LOST = 262144;
42 float IT_BLUE_FLAG_CARRING = 393216;
44 float IT_5HP = 524288;
45 float IT_25HP = 1048576;
46 float IT_ARMOR_SHARD = 2097152;
47 float IT_ARMOR = 4194304;
49 float IT_AMMO = 3968; // IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_FUEL;
50 float IT_PICKUPMASK = 51; // IT_FUEL_REGEN | IT_JETPACK | IT_UNLIMITED_AMMO; // strength and invincible are handled separately
51 float IT_UNLIMITED_AMMO = 3; // IT_UNLIMITED_SUPERWEAPONS | IT_UNLIMITED_WEAPON_AMMO;
53 float AMMO_COUNT = 4; // amount of ammo types to show in the inventory panel
56 string weaponorder_byid;
59 entity get_weaponinfo(float id);
60 string W_FixWeaponOrder(string order, float complete);
61 string W_NameWeaponOrder(string order);
62 string W_NumberWeaponOrder(string order);
70 .float ammo_batteries; // dummy
72 // entity properties of weaponinfo:
73 .float weapon; // WEP_...
74 .float weapons; // WEPBIT_...
75 .string netname; // short name
76 .string message; // human readable name
77 .float items; // IT_...
78 .float(float) weapon_func; // w_...
79 .string mdl; // modelname without g_, v_, w_
80 .string model; // full name of g_ model
81 .float spawnflags; // WEPSPAWNFLAG_... combined
82 .float impulse; // weapon impulse
83 .float bot_pickupbasevalue; // bot weapon priority
84 .string model2; // wpn- sprite name
85 ..float ammo_field; // main ammo field
87 // dynamic weapon adding
88 float w_null(float dummy);
89 void register_weapon(float id, float(float) func, float ammotype, float i, float weapontype, float pickupbasevalue, string modelname, string shortname, string wname);
90 void register_weapons_done();
95 #define WEP_MAXCOUNT 24
97 float WEPBIT_SUPERWEAPONS;
98 #define REGISTER_WEAPON_2(id,bit,func,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname) \
102 void RegisterWeapons_##id() \
104 WEP_LAST = (id = WEP_FIRST + WEP_COUNT); \
105 WEPBIT_ALL |= (bit = power2of(WEP_COUNT)); \
106 WEPBIT_SUPERWEAPONS |= (bit = power2of(WEP_COUNT)) * !!(weapontype & WEP_FLAG_SUPERWEAPON); \
108 register_weapon(id,func,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname); \
110 ACCUMULATE_FUNCTION(RegisterWeapons, RegisterWeapons_##id)
112 #define REGISTER_WEAPON(id,func,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname) \
113 REGISTER_WEAPON_2(WEP_##id,WEPBIT_##id,w_null,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname)
115 #define REGISTER_WEAPON(id,func,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname) \
116 REGISTER_WEAPON_2(WEP_##id,WEPBIT_##id,func,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname)
119 #include "../server/w_all.qc"
121 #undef REGISTER_WEAPON
122 ACCUMULATE_FUNCTION(RegisterWeapons, register_weapons_done)
125 string W_FixWeaponOrder(string order, float complete);
126 string W_NumberWeaponOrder(string order);
127 string W_NameWeaponOrder(string order);
128 string W_FixWeaponOrder_BuildImpulseList(string o);
129 string W_FixWeaponOrder_AllowIncomplete(string order);
130 string W_FixWeaponOrder_ForceComplete(string order);