WEAPON_SHOTGUN its reload sequence can now be interrupted by either primary or secondary fire
This commit is contained in:
parent
061ea05c05
commit
67191ac794
1 changed files with 18 additions and 2 deletions
|
@ -160,17 +160,25 @@ void
|
||||||
w_shotgun_primary(void)
|
w_shotgun_primary(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
player pl = (player)self;
|
||||||
|
|
||||||
if (pl.w_attack_next) {
|
if (pl.w_attack_next) {
|
||||||
w_shotgun_release();
|
w_shotgun_release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl.mode_tempstate > SHOTTY_IDLE) {
|
/* interrupt reloading if no longer empty */
|
||||||
|
if (pl.mode_tempstate == SHOTTY_RELOAD && pl.shotgun_mag >= 1) {
|
||||||
|
pl.mode_tempstate = SHOTTY_RELOAD_END;
|
||||||
|
w_shotgun_release();
|
||||||
|
return;
|
||||||
|
} else if (pl.mode_tempstate > SHOTTY_IDLE) {
|
||||||
|
w_shotgun_release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ammo check */
|
/* Ammo check */
|
||||||
if (pl.shotgun_mag <= 0) {
|
if (pl.shotgun_mag <= 0) {
|
||||||
|
w_shotgun_release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,17 +216,25 @@ void
|
||||||
w_shotgun_secondary(void)
|
w_shotgun_secondary(void)
|
||||||
{
|
{
|
||||||
player pl = (player)self;
|
player pl = (player)self;
|
||||||
|
|
||||||
if (pl.w_attack_next) {
|
if (pl.w_attack_next) {
|
||||||
w_shotgun_release();
|
w_shotgun_release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl.mode_tempstate > SHOTTY_IDLE) {
|
/* interrupt reloading if no longer empty */
|
||||||
|
if (pl.mode_tempstate == SHOTTY_RELOAD && pl.shotgun_mag >= 2) {
|
||||||
|
pl.mode_tempstate = SHOTTY_RELOAD_END;
|
||||||
|
w_shotgun_release();
|
||||||
|
return;
|
||||||
|
} else if (pl.mode_tempstate > SHOTTY_IDLE) {
|
||||||
|
w_shotgun_release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ammo check */
|
/* Ammo check */
|
||||||
if (pl.shotgun_mag <= 1) {
|
if (pl.shotgun_mag <= 1) {
|
||||||
|
w_shotgun_release();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue