mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix -1 (unlimited) ammo decreasing ammo time remaining
Gauntlet and Grappling Hook use -1 ammo. Gauntlet is excluded from the check ammo loop but Grappling Hook causes ammo time remaining to decrease 200 milliseconds. The out of ammo check tests time remaining is equal to zero. This means carrying Grappling Hook and out of ammo will have negative time remaining which results in the low ammo message being displayed instead of out of ammo.
This commit is contained in:
parent
471ea9e564
commit
4af2c91fbf
1 changed files with 3 additions and 0 deletions
|
@ -47,6 +47,9 @@ void CG_CheckAmmo( void ) {
|
|||
if ( ! ( weapons & ( 1 << i ) ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( cg.cur_ps->ammo[i] < 0 ) {
|
||||
continue;
|
||||
}
|
||||
switch ( i ) {
|
||||
case WP_ROCKET_LAUNCHER:
|
||||
case WP_GRENADE_LAUNCHER:
|
||||
|
|
Loading…
Reference in a new issue