]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix vortex chargepol
authorMario <mario@smbclan.net>
Mon, 12 Feb 2018 23:43:21 +0000 (09:43 +1000)
committerMario <mario@smbclan.net>
Mon, 12 Feb 2018 23:43:21 +0000 (09:43 +1000)
qcsrc/common/mutators/mutator/nix/sv_nix.qc
qcsrc/common/weapons/weapon/vortex.qc

index eb14a3159efd0f9f9e4e6fbdcc46cecb6718cb0e..c174b530f0a48e94cb20d6661fd069ecb0e2ecc4 100644 (file)
@@ -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;
        }
                // set last change info
                this.nix_lastchange_id = nix_nextchange;
        }
index 39433dd6fd7272217981c3c7bea49826784ca44c..257faed6b961bfc7c045c3291a5c97ab48ca9507 100644 (file)
@@ -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
                         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, (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);
                             dt = max(0, dt);
 
                             actor.(weaponentity).vortex_charge += dt * WEP_CVAR(vortex, charge_rate);