]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a Vortex charge rate inconsistency with g_balance_vortex_charge_always
authorMario <mario.mario@y7mail.com>
Sat, 27 Feb 2021 12:17:51 +0000 (22:17 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 27 Feb 2021 12:17:51 +0000 (22:17 +1000)
qcsrc/common/weapons/weapon/vortex.qc

index b20f6bda375d4e31f00166e20656960402358604..0e967c92ef69e73b930687c93ad4fd5e1ffab103 100644 (file)
@@ -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)