From: Rudolf Polzer <divverent@alientrap.org>
Date: Sun, 4 Mar 2012 15:56:58 +0000 (+0100)
Subject: kill the WEPBIT_ constants
X-Git-Tag: xonotic-v0.7.0~348^2~1^2~35
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=647c36813beb4a91ccb98cafde49f8ad3a0a32cf;p=xonotic%2Fxonotic-data.pk3dir.git

kill the WEPBIT_ constants
---

diff --git a/qcsrc/common/items.qh b/qcsrc/common/items.qh
index 6504e1724e..ed174c710a 100644
--- a/qcsrc/common/items.qh
+++ b/qcsrc/common/items.qh
@@ -159,7 +159,6 @@ WEPSET_DECLARE_A(WEPBIT_SUPERWEAPONS);
 // note: the fabs call is just there to hide "if result is constant" warning
 #define REGISTER_WEAPON_2(id,bit,func,ammotype,i,weapontype,pickupbasevalue,modelname,shortname,wname) \
 	float id; \
-	float bit; \
 	float func(float); \
 	void RegisterWeapons_##id() \
 	{ \
diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc
index 3aaebde8f3..cf4c5e16a7 100644
--- a/qcsrc/server/miscfunctions.qc
+++ b/qcsrc/server/miscfunctions.qc
@@ -997,7 +997,7 @@ void readplayerstartcvars()
 		}
 	}
 
-	if (g_jetpack || (g_grappling_hook && WEPSET_CONTAINS_AW(start_weapons, WEPBIT_HOOK)))
+	if (g_jetpack || (g_grappling_hook && WEPSET_CONTAINS_AW(start_weapons, WEP_HOOK)))
 	{
 		g_grappling_hook = 0; // these two can't coexist, as they use the same button
 		start_items |= IT_FUEL_REGEN;
diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc
index 3e67ba9bda..99bacf4606 100644
--- a/qcsrc/server/t_items.qc
+++ b/qcsrc/server/t_items.qc
@@ -377,7 +377,7 @@ float Item_GiveTo(entity item, entity player)
 			// else if(item.items == IT_CELLS)
 			//	AnnounceTo(player, "ammo");
 
-			if (item.weapons & WEPBIT_MINSTANEX)
+			if (WEPSET_CONTAINS_EW(item, WEP_MINSTANEX))
 				W_GiveWeapon (player, WEP_MINSTANEX, item.netname);
 			if (item.ammo_cells)
 				player.ammo_cells = bound(player.ammo_cells, 999, player.ammo_cells + autocvar_g_minstagib_ammo_drop);