mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-26 05:41:20 +00:00
SERVER: Better support for hiding crosshair during dual reload
This commit is contained in:
parent
6fe33b26d9
commit
206120f01e
2 changed files with 8 additions and 2 deletions
|
@ -93,6 +93,8 @@ void () W2_Frame_Update =
|
|||
}
|
||||
else
|
||||
{
|
||||
if (self.callfuncat2 != self.weapon2frame && self.reload_delay <= time)
|
||||
W_ShowCrosshair(self);
|
||||
self.weapon2frame = self.weapon2frame_end = self.weapon2frame = GetFrame(self.weapon,BASE_FRAME);
|
||||
self.new_anim2_stop = FALSE;
|
||||
self.weapon2_anim_type = 0;
|
||||
|
@ -159,7 +161,7 @@ void () W_Frame_Update =
|
|||
}
|
||||
else
|
||||
{
|
||||
if (self.callfuncat != self.weaponframe)
|
||||
if (self.callfuncat != self.weaponframe && self.reload_delay2 <= time)
|
||||
W_ShowCrosshair(self);
|
||||
self.weaponframe_end = self.weaponframe = GetFrame(self.weapon,BASE_FRAME);
|
||||
self.new_anim_stop = FALSE;
|
||||
|
|
|
@ -411,7 +411,11 @@ void(float side) W_Reload =
|
|||
|
||||
W_AimOut();
|
||||
W_SprintStop();
|
||||
W_HideCrosshair(self);
|
||||
|
||||
// If it's a dual wielded weapon, we don't want to hide the crosshair
|
||||
// unless both weapons are being reloaded.
|
||||
if (!IsDualWeapon(self.weapon) || (self.reload_delay > time || self.reload_delay2 > time))
|
||||
W_HideCrosshair(self);
|
||||
|
||||
float endframe, startframe, reloadcancelframe, delay;
|
||||
string modelname = "";
|
||||
|
|
Loading…
Reference in a new issue