WEAPON_GLOCK: Don't play idle animations when empty.
This commit is contained in:
parent
d579defc89
commit
522e45b1ee
1 changed files with 12 additions and 9 deletions
|
@ -151,6 +151,15 @@ w_glock_holster(player pl)
|
|||
Weapons_ViewAnimation(pl, GLOCK_HOLSTER);
|
||||
}
|
||||
|
||||
int
|
||||
w_glock_isempty(player pl)
|
||||
{
|
||||
if (pl.glock_mag <= 0 && pl.ammo_9mm <= 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
w_glock_primary(player pl)
|
||||
{
|
||||
|
@ -286,6 +295,9 @@ w_glock_release(player pl)
|
|||
return;
|
||||
}
|
||||
|
||||
if (w_glock_isempty(pl))
|
||||
return;
|
||||
|
||||
if (pl.w_idle_next > 0.0) {
|
||||
return;
|
||||
}
|
||||
|
@ -389,15 +401,6 @@ w_glock_hudpic(player pl, int selected, vector pos, float a)
|
|||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
w_glock_isempty(player pl)
|
||||
{
|
||||
if (pl.glock_mag <= 0 && pl.ammo_9mm <= 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
weapontype_t
|
||||
w_glock_type(player pl)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue