From: Mario <mario.mario@y7mail.com>
Date: Sat, 27 Feb 2021 12:17:51 +0000 (+1000)
Subject: Fix a Vortex charge rate inconsistency with g_balance_vortex_charge_always
X-Git-Tag: xonotic-v0.8.5~558
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a26d3abc46868fa7259c717641c4011be535b95c;p=xonotic%2Fxonotic-data.pk3dir.git

Fix a Vortex charge rate inconsistency with g_balance_vortex_charge_always
---

diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc
index b20f6bda3..0e967c92e 100644
--- a/qcsrc/common/weapons/weapon/vortex.qc
+++ b/qcsrc/common/weapons/weapon/vortex.qc
@@ -164,7 +164,7 @@ void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float i
 void W_Vortex_Charge(entity actor, .entity weaponentity, float dt)
 {
     if(WEP_CVAR(vortex, charge) && actor.(weaponentity).vortex_charge < WEP_CVAR(vortex, charge_limit))
-        actor.(weaponentity).vortex_charge = min(1, actor.(weaponentity).vortex_charge + WEP_CVAR(vortex, charge_rate) * dt / W_TICSPERFRAME);
+        actor.(weaponentity).vortex_charge = min(1, actor.(weaponentity).vortex_charge + WEP_CVAR(vortex, charge_rate) * dt);
 }
 
 METHOD(Vortex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
@@ -180,7 +180,7 @@ METHOD(Vortex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
 METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
 {
     if(!WEP_CVAR(vortex, charge_always))
-        W_Vortex_Charge(actor, weaponentity, frametime);
+        W_Vortex_Charge(actor, weaponentity, frametime / W_TICSPERFRAME);
 
     if(WEP_CVAR_SEC(vortex, chargepool))
         if(actor.(weaponentity).vortex_chargepool_ammo < 1)