# define WEPBITS_CLEAR_A(a) ((a) = 0)
# define WEPBITS_COPY_EE(e,e2) ((e).weapons = (e2).weapons)
+# define WEPBITS_EQ_EE(e,e2) ((e).weapons == (e2).weapons)
# define WEPBITS_OR_EE(e,e2) ((e).weapons |= (e2).weapons)
# define WEPBITS_AND_EE(e,e2) ((e).weapons &= (e2).weapons)
# define WEPBITS_ANDNOT_EE(e,e2) ((e).weapons &~= (e2).weapons)
# define WEPBITS_TEST_EE(e,e2) ((e).weapons & (e2).weapons)
# define WEPBITS_COPY_EA(e,a) ((e).weapons = (a))
+# define WEPBITS_EQ_EA(e,a) ((e).weapons == (a))
# define WEPBITS_OR_EA(e,a) ((e).weapons |= (a))
# define WEPBITS_AND_EA(e,a) ((e).weapons &= (a))
# define WEPBITS_ANDNOT_EA(e,a) ((e).weapons &~= (a))
# define WEPBITS_TEST_EA(e,a) ((e).weapons & (a))
# define WEPBITS_COPY_AA(a,a2) ((a) = (a2))
+# define WEPBITS_EQ_AA(a,a2) ((a) == (a2))
# define WEPBITS_OR_AA(a,a2) ((a) |= (a2))
# define WEPBITS_AND_AA(a,a2) ((a) &= (a2))
# define WEPBITS_ANDNOT_AA(a,a2) ((a) &~= (a2))
# define WEPBITS_TEST_AA(a,a2) ((a) & (a2))
# define WEPBITS_COPY_EW(e,w) ((e).weapons = power2of((w) - WEP_FIRST))
+# define WEPBITS_EQ_EW(e,w) ((e).weapons == power2of((w) - WEP_FIRST))
# define WEPBITS_OR_EW(e,w) ((e).weapons |= power2of((w) - WEP_FIRST))
# define WEPBITS_AND_EW(e,w) ((e).weapons &= power2of((w) - WEP_FIRST))
# define WEPBITS_ANDNOT_EW(e,w) ((e).weapons &~= power2of((w) - WEP_FIRST))
# define WEPBITS_TEST_EW(e,w) ((e).weapons & power2of((w) - WEP_FIRST))
# define WEPBITS_COPY_AW(a,w) ((a) = power2of((w) - WEP_FIRST))
+# define WEPBITS_EQ_AW(a,w) ((a) == power2of((w) - WEP_FIRST))
# define WEPBITS_OR_AW(a,w) ((a) |= power2of((w) - WEP_FIRST))
# define WEPBITS_AND_AW(a,w) ((a) &= power2of((w) - WEP_FIRST))
# define WEPBITS_ANDNOT_AW(a,w) ((a) &~= power2of((w) - WEP_FIRST))
self.weapons = start_weapons;
}
- if(self.weapons & WEPBIT_SUPERWEAPONS) // exception for minstagib, as minstanex is a superweapon
+ if(WEPBITS_TEST_EA(self, WEPBIT_SUPERWEAPONS)) // exception for minstagib, as minstanex is a superweapon
self.superweapons_finished = time + autocvar_g_balance_superweapons_time;
else
self.superweapons_finished = 0;
if(g_weaponarena_random)
{
if(g_weaponarena_random_with_laser)
- self.weapons &~= WEPBIT_LASER;
+ WEPBITS_ANDNOT_EW(self, WEPBIT_LASER);
self.weapons = randombits(self.weapons, g_weaponarena_random, FALSE);
if(g_weaponarena_random_with_laser)
- self.weapons |= WEPBIT_LASER;
+ WEPBITS_OR_EW(self, WEPBIT_LASER);
}
self.items = start_items;