From: Mircea Kitsune Date: Fri, 11 Feb 2011 20:12:10 +0000 (+0200) Subject: Comment out that last change, rather X-Git-Tag: xonotic-v0.5.0~309^2~7^2~44 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7cec24a2584e2663395210a6de1292dad6842953;p=xonotic%2Fxonotic-data.pk3dir.git Comment out that last change, rather --- diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index 58c0f275e..85ab74396 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -1688,6 +1688,12 @@ void W_ReloadEnd() } self.weapon_load[self.weapon] = self.clip_load; + // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon, + // then quickly switch to another weapon and back to it. Reloading is canceled, but the 2 second reload time is still there, + // so your weapon is delayed for 2 seconds without reason + + //ATTACK_FINISHED(self) -= self.reload_time - 1; + w_ready(); } @@ -1702,6 +1708,12 @@ void W_ReloadStart() sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM); + // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon, + // then quickly switch to another weapon and back to it. Reloading is canceled, but the 2 second reload time is still there, + // so your weapon is delayed for 2 seconds without reason + + //ATTACK_FINISHED(self) = max(time, ATTACK_FINISHED(self)) + self.reload_time + 1; + weapon_thinkf(WFRAME_RELOAD, self.reload_time, W_ReloadEnd); self.old_clip_load = self.clip_load;