From 7198f69860902c5f8bd6b200db25101353b91316 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 13 Feb 2018 09:43:21 +1000 Subject: [PATCH] Fix vortex chargepol --- qcsrc/common/mutators/mutator/nix/sv_nix.qc | 12 ------------ qcsrc/common/weapons/weapon/vortex.qc | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/qcsrc/common/mutators/mutator/nix/sv_nix.qc b/qcsrc/common/mutators/mutator/nix/sv_nix.qc index eb14a3159e..c174b530f0 100644 --- a/qcsrc/common/mutators/mutator/nix/sv_nix.qc +++ b/qcsrc/common/mutators/mutator/nix/sv_nix.qc @@ -183,18 +183,6 @@ void NIX_GiveCurrentWeapon(entity this) } } - // vortex too - if(WEP_CVAR(vortex, charge)) - { - if(WEP_CVAR_SEC(vortex, chargepool)) - this.vortex_chargepool_ammo = 1; - for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) - { - .entity weaponentity = weaponentities[slot]; - this.(weaponentity).vortex_charge = WEP_CVAR(vortex, charge_start); - } - } - // set last change info this.nix_lastchange_id = nix_nextchange; } diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 39433dd6fd..257faed6b9 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -208,11 +208,11 @@ METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity if(WEP_CVAR_SEC(vortex, ammo)) { // always deplete if secondary is held - actor.vortex_chargepool_ammo = max(0, actor.vortex_chargepool_ammo - WEP_CVAR_SEC(vortex, ammo) * dt); + actor.(weaponentity).vortex_chargepool_ammo = max(0, actor.(weaponentity).vortex_chargepool_ammo - WEP_CVAR_SEC(vortex, ammo) * dt); dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(vortex, charge_rate)); actor.vortex_chargepool_pauseregen_finished = time + WEP_CVAR_SEC(vortex, chargepool_pause_regen); - dt = min(dt, actor.vortex_chargepool_ammo); + dt = min(dt, actor.(weaponentity).vortex_chargepool_ammo); dt = max(0, dt); actor.(weaponentity).vortex_charge += dt * WEP_CVAR(vortex, charge_rate); -- 2.39.2