WEAPON_ASSCAN: Polish it some more
This commit is contained in:
parent
744e09ec42
commit
5fdb709ce8
|
@ -73,6 +73,7 @@ w_asscan_precache(void)
|
||||||
|
|
||||||
#ifdef CLIENT
|
#ifdef CLIENT
|
||||||
precache_model("models/v_tfac.mdl");
|
precache_model("models/v_tfac.mdl");
|
||||||
|
Sound_Precache("modelevent_shell.land");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,25 +124,19 @@ w_asscan_holster(player pl)
|
||||||
void
|
void
|
||||||
w_asscan_release(player pl)
|
w_asscan_release(player pl)
|
||||||
{
|
{
|
||||||
/* auto-reload if need be */
|
|
||||||
if (pl.w_attack_next <= 0.0)
|
|
||||||
if (pl.m_iAmmoShells > 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pl.w_idle_next > 0.0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* end firing */
|
/* end firing */
|
||||||
if (pl.mode_tempstate == 1) {
|
if (pl.mode_tempstate == 1) {
|
||||||
pl.mode_tempstate = 0;
|
pl.mode_tempstate = 0;
|
||||||
Weapons_Sound(pl, CHAN_WEAPON, "weapon_asscan.spindown");
|
Weapons_Sound(pl, CHAN_WEAPON, "weapon_asscan.spindown");
|
||||||
Weapons_ViewAnimation(pl, ASSCAN_SPINDOWN);
|
Weapons_ViewAnimation(pl, ASSCAN_SPINDOWN);
|
||||||
pl.w_attack_next = 1.0f;
|
pl.w_attack_next = 1.0f;
|
||||||
pl.w_idle_next = pl.w_attack_next;
|
pl.w_idle_next = 4.0f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pl.w_idle_next > 0.0)
|
||||||
|
return;
|
||||||
|
|
||||||
int r = (float)input_sequence % 2;
|
int r = (float)input_sequence % 2;
|
||||||
if (r) {
|
if (r) {
|
||||||
Weapons_ViewAnimation(pl, ASSCAN_IDLE1);
|
Weapons_ViewAnimation(pl, ASSCAN_IDLE1);
|
||||||
|
@ -155,6 +150,7 @@ w_asscan_release(player pl)
|
||||||
void
|
void
|
||||||
w_asscan_primary(player pl)
|
w_asscan_primary(player pl)
|
||||||
{
|
{
|
||||||
|
/* rate check */
|
||||||
if (pl.w_attack_next > 0.0)
|
if (pl.w_attack_next > 0.0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -173,6 +169,8 @@ w_asscan_primary(player pl)
|
||||||
pl.w_idle_next = pl.w_attack_next;
|
pl.w_idle_next = pl.w_attack_next;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* from now on we're just going rambo */
|
||||||
pl.m_iAmmoShells--;
|
pl.m_iAmmoShells--;
|
||||||
|
|
||||||
Weapons_ViewAnimation(pl, ASSCAN_FIRE);
|
Weapons_ViewAnimation(pl, ASSCAN_FIRE);
|
||||||
|
@ -202,7 +200,6 @@ w_asscan_hud(player pl)
|
||||||
|
|
||||||
HUD_DrawAmmo2();
|
HUD_DrawAmmo2();
|
||||||
|
|
||||||
|
|
||||||
drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/128], [24/256, 24/128], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE);
|
drawsubpic(aicon_pos, [24,24], g_hud7_spr, [72/256,72/128], [24/256, 24/128], g_hud_color, pSeatLocal->m_flAmmo2Alpha, DRAWFLAG_ADDITIVE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue