From 5617387593ef7221da130467941929b578be8731 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Wed, 29 Mar 2017 08:47:30 +0300 Subject: [PATCH] Fixed Overkill Vortex reload. --- .../mutators/mutator/overkill/okvortex.qc | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/mutators/mutator/overkill/okvortex.qc b/qcsrc/common/mutators/mutator/overkill/okvortex.qc index 289de3a5d..98900f7aa 100644 --- a/qcsrc/common/mutators/mutator/overkill/okvortex.qc +++ b/qcsrc/common/mutators/mutator/overkill/okvortex.qc @@ -125,16 +125,20 @@ METHOD(OverkillVortex, wr_aim, void(entity thiswep, entity actor, .entity weapon METHOD(OverkillVortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { - if(WEP_CVAR(okvortex, charge) && actor.(weaponentity).okvortex_charge < WEP_CVAR(okvortex, charge_limit)) + if (WEP_CVAR(okvortex, charge) && actor.(weaponentity).okvortex_charge < WEP_CVAR(okvortex, charge_limit)) + { actor.(weaponentity).okvortex_charge = min(1, actor.(weaponentity).okvortex_charge + WEP_CVAR(okvortex, charge_rate) * frametime / W_TICSPERFRAME); + } - if(weaponslot(weaponentity) == 0) + if (weaponslot(weaponentity) == 0) + { actor.okvortex_charge = actor.(weaponentity).okvortex_charge; + } - if(WEP_CVAR_SEC(okvortex, chargepool)) - if(actor.(weaponentity).okvortex_chargepool_ammo < 1) + if (WEP_CVAR_SEC(okvortex, chargepool)) + if (actor.(weaponentity).okvortex_chargepool_ammo < 1) { - if(actor.okvortex_chargepool_pauseregen_finished < time) + if (actor.okvortex_chargepool_pauseregen_finished < time) actor.(weaponentity).okvortex_chargepool_ammo = min(1, actor.(weaponentity).okvortex_chargepool_ammo + WEP_CVAR_SEC(okvortex, chargepool_regen) * frametime / W_TICSPERFRAME); actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(okvortex, chargepool_pause_regen)); } @@ -142,9 +146,12 @@ METHOD(OverkillVortex, wr_think, void(entity thiswep, entity actor, .entity weap if(weaponslot(weaponentity) == 0) actor.okvortex_chargepool_ammo = actor.(weaponentity).okvortex_chargepool_ammo; - if(autocvar_g_balance_okvortex_reload_ammo && actor.(weaponentity).clip_load < min(WEP_CVAR_PRI(okvortex, ammo), WEP_CVAR_SEC(okvortex, ammo))) { // forced reload + if (autocvar_g_balance_okvortex_reload_ammo && actor.(weaponentity).clip_load < WEP_CVAR_PRI(okvortex, ammo)) + { + // forced reload thiswep.wr_reload(thiswep, actor, weaponentity); - } else + } + else { if (fire & 1) { -- 2.39.2