mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-05 17:01:56 +00:00
- Duke: added an ammo check to the chaingun firing loop
With weapon switching disabled it would not stop firing.
This commit is contained in:
parent
aa3df50f9b
commit
dc60c643c9
1 changed files with 6 additions and 0 deletions
|
@ -2375,6 +2375,12 @@ static void operateweapon(int snum, ESyncBits actions)
|
||||||
{
|
{
|
||||||
if (((p->kickback_pic) % 3) == 0)
|
if (((p->kickback_pic) % 3) == 0)
|
||||||
{
|
{
|
||||||
|
if (p->ammo_amount[CHAINGUN_WEAPON] <= 0)
|
||||||
|
{
|
||||||
|
p->ammo_amount[CHAINGUN_WEAPON] = 0;
|
||||||
|
p->okickback_pic = p->kickback_pic = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
p->ammo_amount[CHAINGUN_WEAPON]--;
|
p->ammo_amount[CHAINGUN_WEAPON]--;
|
||||||
|
|
||||||
if ((p->kickback_pic % 3) == 0)
|
if ((p->kickback_pic % 3) == 0)
|
||||||
|
|
Loading…
Reference in a new issue