From: Rudolf Polzer Date: Tue, 23 Aug 2011 06:23:13 +0000 (+0200) Subject: also charge the nex X-Git-Tag: xonotic-v0.5.0~74^2~3 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=b793e2c23fafe1ca252ae0bee673c3fd5b0e6a98;p=xonotic%2Fxonotic-data.pk3dir.git also charge the nex --- diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index 5a35b137b..6e85e7aff 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -104,11 +104,20 @@ void NIX_GiveCurrentWeapon() Send_CSQC_Centerprint_Generic(self, CPID_NIX_WPNCHANGE, strcat("^2Active weapon: ^3", W_Name(nix_weapon)), 0, 0); weapon_action(nix_weapon, WR_RESETPLAYER); + // all weapons must be fully loaded when we spawn entity e; e = get_weaponinfo(nix_weapon); if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars self.weapon_load[nix_weapon] = cvar(strcat("g_balance_", e.netname, "_reload_ammo")); + + // nex too + if(autocvar_g_balance_nex_charge) + { + if(autocvar_g_balance_nex_secondary_chargepool) + self.nex_chargepool_ammo = 1; + self.nex_charge = autocvar_g_balance_nex_charge_start; + } } if(self.nix_lastinfotime != dt) {