]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
kill the WEPBIT_ constants
authorRudolf Polzer <divverent@alientrap.org>
Sun, 4 Mar 2012 15:56:58 +0000 (16:56 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 4 Mar 2012 15:56:58 +0000 (16:56 +0100)
qcsrc/common/items.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/t_items.qc

index 6504e1724e095f6a97ef7ec6a2f674b304c99f99..ed174c710a8123a199f84e65a824d5d998713c60 100644 (file)
@@ -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() \
        { \
index 3aaebde8f315a9309660e0efbef5bd8cf13a6adf..cf4c5e16a7c2a6b7f09248ff1443cbfb799ed3bb 100644 (file)
@@ -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;
index 3e67ba9bda8c95d002b5ca0fa46236cbe6e38714..99bacf4606a3488eba4ad7ac07ea1167b7277a77 100644 (file)
@@ -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);