try renaming charge_pool to chargepool to make the cvar name a bit shorter
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_nex.qc
index 6e32108..3ff9880 100644 (file)
@@ -80,7 +80,7 @@ void W_Nex_Attack (float issecondary)
 
 void spawnfunc_weapon_nex (void); // defined in t_items.qc
 
-.float nex_charge_pool_pauseregen_finished;
+.float nex_chargepool_pauseregen_finished;
 float w_nex(float req)
 {
        float dt;
@@ -111,12 +111,12 @@ float w_nex(float req)
             self.exteriorweaponentity.glowmod = self.weaponentity.weaponentity.glowmod;
         }
 
-               if(cvar("g_balance_nex_secondary_charge_pool"))
-               if(self.nex_charge_pool_ammo < 1)
+               if(cvar("g_balance_nex_secondary_chargepool"))
+               if(self.nex_chargepool_ammo < 1)
                {
-                       if(self.nex_charge_pool_pauseregen_finished < time)
-                               self.nex_charge_pool_ammo = min(1, self.nex_charge_pool_ammo + cvar("g_balance_nex_secondary_charge_pool_regen") * frametime / W_TICSPERFRAME);
-                       self.pauseregen_finished = max(self.pauseregen_finished, time + cvar("g_balance_nex_secondary_charge_pool_pause_health_regen"));
+                       if(self.nex_chargepool_pauseregen_finished < time)
+                               self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + cvar("g_balance_nex_secondary_chargepool_regen") * frametime / W_TICSPERFRAME);
+                       self.pauseregen_finished = max(self.pauseregen_finished, time + cvar("g_balance_nex_secondary_chargepool_pause_health_regen"));
                }
 
                if (self.BUTTON_ATCK)
@@ -134,16 +134,16 @@ float w_nex(float req)
                                self.nex_charge_rottime = time + cvar("g_balance_nex_charge_rot_pause");
                                dt = frametime / W_TICSPERFRAME;
 
-                               if(cvar("g_balance_nex_secondary_charge_pool"))
+                               if(cvar("g_balance_nex_secondary_chargepool"))
                                {
                                        if(cvar("g_balance_nex_secondary_ammo"))
                                        {
                                                // always deplete if secondary is held
-                                               self.nex_charge_pool_ammo = max(0, self.nex_charge_pool_ammo - cvar("g_balance_nex_secondary_ammo") * dt);
+                                               self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - cvar("g_balance_nex_secondary_ammo") * dt);
 
                                                dt = min(dt, (1 - self.nex_charge) / cvar("g_balance_nex_secondary_charge_rate"));
-                                               self.nex_charge_pool_pauseregen_finished = time + cvar("g_balance_nex_secondary_charge_pool_pause_regen");
-                                               dt = min(dt, self.nex_charge_pool_ammo);
+                                               self.nex_chargepool_pauseregen_finished = time + cvar("g_balance_nex_secondary_chargepool_pause_regen");
+                                               dt = min(dt, self.nex_chargepool_ammo);
                                                dt = max(0, dt);
 
                                                self.nex_charge += dt * cvar("g_balance_nex_secondary_charge_rate");