X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_nex.qc;h=cdcabc86688996cde0ce04f43dd94816ab9eb88e;hb=af65d6be57cc21d4609edd764fe413d8742a3fdc;hp=59734f20c3dce7f5831286263b2432694becf673;hpb=588aa51e32e49279fce822b415e754460b0c45c1;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 59734f20c..cdcabc866 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -161,7 +161,7 @@ float w_nex(float req) { self.clip_load = max(autocvar_g_balance_nex_secondary_ammo, self.clip_load - autocvar_g_balance_nex_secondary_ammo * dt); } - self.weapon_load[WEP_NEX] = self.clip_load; + self.(weapon_load[WEP_NEX]) = self.clip_load; } else { @@ -216,15 +216,22 @@ float w_nex(float req) else if (req == WR_CHECKAMMO1) { ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_primary_ammo; - ammo_amount += (autocvar_g_balance_nex_reload_ammo && self.weapon_load[WEP_NEX] >= autocvar_g_balance_nex_primary_ammo); + ammo_amount += (autocvar_g_balance_nex_reload_ammo && self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_primary_ammo); return ammo_amount; } else if (req == WR_CHECKAMMO2) { - // don't allow charging if we don't have enough ammo - ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo; - ammo_amount += self.weapon_load[WEP_NEX] >= autocvar_g_balance_nex_secondary_ammo; - return ammo_amount; + if(autocvar_g_balance_nex_secondary) + { + // don't allow charging if we don't have enough ammo + ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo; + ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo; + return ammo_amount; + } + else + { + return FALSE; // zoom is not a fire mode + } } else if (req == WR_RELOAD) { @@ -232,7 +239,7 @@ float w_nex(float req) } return TRUE; -}; +} #endif #ifdef CSQC float w_nex(float req) @@ -243,7 +250,7 @@ float w_nex(float req) org2 = w_org + w_backoff * 6; pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1); if(!w_issilent) - sound(self, CH_SHOTS_SINGLE, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM); + sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM); } else if(req == WR_PRECACHE) { @@ -252,7 +259,7 @@ float w_nex(float req) else if (req == WR_SUICIDEMESSAGE) w_deathtypestring = _("%s is now thinking with portals"); else if (req == WR_KILLMESSAGE) - w_deathtypestring = _("%s has been vaporized by %s"); + w_deathtypestring = _("%s has been vaporized by %s's nex"); return TRUE; } #endif