From: Rudolf Polzer Date: Sun, 4 Mar 2012 16:01:43 +0000 (+0100) Subject: w only t_items.qc is still evil X-Git-Tag: xonotic-v0.7.0~348^2~1^2~34 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e1a104323ec4ad3baa9a35e0e5c4000c776b801a;p=xonotic%2Fxonotic-data.pk3dir.git w only t_items.qc is still evil --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index cf4c5e16a..48f9b5c19 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -918,7 +918,7 @@ void readplayerstartcvars() { e = get_weaponinfo(i); if(want_weapon("g_start_weapon_", e, FALSE)) - WEPSET_OR_AW(start_weapons, e.weapons); + WEPSET_OR_AW(start_weapons, i); } } @@ -992,7 +992,7 @@ void readplayerstartcvars() { e = get_weaponinfo(i); if(want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"))) - WEPSET_OR_AW(warmup_start_weapons, j); + WEPSET_OR_AW(warmup_start_weapons, i); } } } diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index fd1a8fb59..85d0efefb 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -139,7 +139,7 @@ void GiveBall(entity plyr, entity ball) ownr = self; self = plyr; - self.weaponentity.weapons = self.weapons; + WEPSET_COPY_EE(self.weaponentity, self); self.weaponentity.switchweapon = self.weapon; WEPSET_COPY_EW(self, WEP_PORTO); weapon_action(WEP_PORTO, WR_RESETPLAYER); @@ -921,14 +921,14 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPreThink) } else { - if(self.weaponentity.weapons) + if(!WEPSET_EMPTY_E(self.weaponentity)) { - self.weapons = self.weaponentity.weapons; + WEPSET_COPY_EE(self, self.weaponentity); weapon_action(WEP_PORTO, WR_RESETPLAYER); self.switchweapon = self.weaponentity.switchweapon; W_SwitchWeapon(self.switchweapon); - self.weaponentity.weapons = 0; + WEPSET_CLEAR_E(self.weaponentity); } } @@ -938,7 +938,7 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPreThink) MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn) { - self.weaponentity.weapons = 0; + WEPSET_CLEAR_E(self.weaponentity); if(nexball_mode & NBM_BASKETBALL) WEPSET_OR_EW(self, WEP_PORTO); diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index 45aa9d14b..76e779c5a 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -13,11 +13,11 @@ float NIX_CanChooseWeapon(float wpn) { entity e; e = get_weaponinfo(wpn); - if(!e.weapons) // skip dummies + if(!e.weapon) // skip dummies return FALSE; if(g_weaponarena) { - if not(g_weaponarena & e.weapons) + if not(WEPSET_CONTAINS_AW(g_weaponarena_weapons, wpn)) return FALSE; } else @@ -134,7 +134,7 @@ void NIX_GiveCurrentWeapon() self.nix_nextincr = time + autocvar_g_balance_nix_incrtime; } - self.weapons = 0; + WEPSET_CLEAR_E(self); if(g_nix_with_laser) WEPSET_ANDNOT_EW(self, WEP_LASER); WEPSET_OR_EW(self, nix_weapon);