mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 21:31:03 +00:00
- use the correct code for the devastator in operateweapon.
The code present was from EDuke 2.1, I have no idea if it ever worked there. It was replaced with JFDuke's. Fixes #104.
This commit is contained in:
parent
72806e27eb
commit
ba3c353198
1 changed files with 18 additions and 11 deletions
|
@ -2370,23 +2370,30 @@ static void operateweapon(int snum, ESyncBits sb_snum, int psect)
|
||||||
{
|
{
|
||||||
p->kickback_pic++;
|
p->kickback_pic++;
|
||||||
|
|
||||||
if (aplWeaponFlags[p->curr_weapon][snum] & WEAPON_FLAG_FIREEVERYOTHER)
|
if (isNam())
|
||||||
// fire every other...
|
{
|
||||||
|
if ((p->kickback_pic >= 2) &&
|
||||||
if ((p->kickback_pic >= aplWeaponFireDelay[p->curr_weapon][snum]) &&
|
p->kickback_pic < 5 &&
|
||||||
p->kickback_pic < aplWeaponHoldDelay[p->curr_weapon][snum] &&
|
|
||||||
(p->kickback_pic & 1))
|
(p->kickback_pic & 1))
|
||||||
{
|
{
|
||||||
{
|
p->visibility = 0;
|
||||||
// make them visible if not set...
|
lastvisinc = (int)totalclock + 32;
|
||||||
p->visibility = 0;
|
|
||||||
lastvisinc = (int)totalclock + 32;
|
|
||||||
}
|
|
||||||
fi.shoot(pi, RPG);
|
fi.shoot(pi, RPG);
|
||||||
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
||||||
checkavailweapon(p);
|
checkavailweapon(p);
|
||||||
}
|
}
|
||||||
if (p->kickback_pic > 5) p->okickback_pic = p->kickback_pic = 0;
|
if (p->kickback_pic > 5) p->kickback_pic = 0;
|
||||||
|
}
|
||||||
|
else if (p->kickback_pic & 1)
|
||||||
|
{
|
||||||
|
p->visibility = 0;
|
||||||
|
lastvisinc = (int)totalclock + 32;
|
||||||
|
fi.shoot(pi, RPG);
|
||||||
|
p->ammo_amount[DEVISTATOR_WEAPON]--;
|
||||||
|
checkavailweapon(p);
|
||||||
|
if (p->ammo_amount[DEVISTATOR_WEAPON] <= 0) p->kickback_pic = 0;
|
||||||
|
}
|
||||||
|
if (p->kickback_pic > 5) p->kickback_pic = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FREEZE_WEAPON:
|
case FREEZE_WEAPON:
|
||||||
|
|
Loading…
Reference in a new issue