]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge two voids back again. It makes more sense this way.
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 11 Feb 2011 21:02:45 +0000 (23:02 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 11 Feb 2011 21:02:45 +0000 (23:02 +0200)
qcsrc/server/cl_weaponsystem.qc

index 176ecb7db1f2f93b1735e5ba21b654a5c60600e6..0e6867f7246760d0721efd7f55240fe54034be89 100644 (file)
@@ -1664,7 +1664,6 @@ float W_ReloadCheck()
                        sprint(self, strcat("You don't have enough ammo to reload the ^2", W_Name(self.weapon), "\n"));
                        self.reload_complain = time + 1;
                }
-
                // switch away if the amount of ammo is not enough to keep using this weapon
                if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
                {
@@ -1686,7 +1685,7 @@ float W_ReloadCheck()
        return TRUE;
 }
 
-void W_ReloadEnd()
+void W_ReloadedAndReady()
 {
        // finish the reloading process, and do the ammo transfer
 
@@ -1714,9 +1713,18 @@ void W_ReloadEnd()
        w_ready();
 }
 
-void W_ReloadStart()
+void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, string sent_sound)
 {
-       // begin the reloading process
+       // set global values to work with
+       self.reload_ammo_min = sent_ammo_min;
+       self.reload_ammo_amount = sent_ammo_amount;
+       self.reload_time = sent_time;
+       self.reload_sound = sent_sound;
+
+       if(!W_ReloadCheck())
+               return;
+
+       // now begin the reloading process
 
        sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM);
 
@@ -1726,23 +1734,8 @@ void W_ReloadStart()
 
        //ATTACK_FINISHED(self) = max(time, ATTACK_FINISHED(self)) + self.reload_time + 1;
 
-       weapon_thinkf(WFRAME_RELOAD, self.reload_time, W_ReloadEnd);
+       weapon_thinkf(WFRAME_RELOAD, self.reload_time, W_ReloadedAndReady);
 
        self.old_clip_load = self.clip_load;
        self.clip_load = -1;
-}
-
-void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, string sent_sound)
-{
-       // set global values to work with
-       self.reload_ammo_min = sent_ammo_min;
-       self.reload_ammo_amount = sent_ammo_amount;
-       self.reload_time = sent_time;
-       self.reload_sound = sent_sound;
-
-       if(!W_ReloadCheck())
-               return;
-
-       // now begin the actual reloading
-       W_ReloadStart();
 }
\ No newline at end of file