]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 11 Feb 2011 20:09:05 +0000 (22:09 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 11 Feb 2011 20:09:05 +0000 (22:09 +0200)
qcsrc/server/cl_weaponsystem.qc

index 6e3558e9b78ba3f19000597daea8239613493d92..58c0f275ef2d46f5d6f2acd8446475d5d97636f0 100644 (file)
@@ -1671,8 +1671,6 @@ float W_ReloadCheck(float ammo_amount, float ammo_shot)
 
 void W_ReloadEnd()
 {
-       float t;
-
        // now do the ammo transfer
 
        self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
@@ -1690,8 +1688,6 @@ void W_ReloadEnd()
        }
        self.weapon_load[self.weapon] = self.clip_load;
 
-       t = ATTACK_FINISHED(self) - self.reload_time - 1;
-       ATTACK_FINISHED(self) = t;
        w_ready();
 }
 
@@ -1704,13 +1700,8 @@ void W_ReloadStart()
        if(!W_ReloadCheck(self.(self.current_ammo), self.reload_ammo_min))
                return;
 
-       float t;
-
        sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM);
 
-       t = max(time, ATTACK_FINISHED(self)) + self.reload_time + 1;
-       ATTACK_FINISHED(self) = t;
-
        weapon_thinkf(WFRAME_RELOAD, self.reload_time, W_ReloadEnd);
 
        self.old_clip_load = self.clip_load;