mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-11 03:01:12 +00:00
- Exhumed: Restore original grenade pickup code.
* When I read this against the generic weapon pickup code, it looked similar enough but the grenade's logic is reversed. That is, after picking up the weapon, equip the player. The generic weapon handler equips the player, then gives them ammo. * Fixes #904.
This commit is contained in:
parent
99e23a8d24
commit
94f188c926
1 changed files with 20 additions and 1 deletions
|
@ -911,7 +911,26 @@ void doPlayerItemPickups(Player* const pPlayer)
|
|||
case 9: // Grenade
|
||||
case 27: // May not be grenade, needs confirmation
|
||||
case 55:
|
||||
doPickupWeapon(pPlayer, pPickupActor, nItem, 4, 1, kSoundAmmoPickup);
|
||||
if (AddAmmo(pPlayer->nPlayer, 4, 1))
|
||||
{
|
||||
if (!(pPlayer->nPlayerWeapons & 0x10))
|
||||
{
|
||||
pPlayer->nPlayerWeapons |= 0x10;
|
||||
SetNewWeaponIfBetter(pPlayer->nPlayer, 4);
|
||||
}
|
||||
|
||||
if (nItem == 55)
|
||||
{
|
||||
pPickupActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
DestroyItemAnim(pPickupActor);
|
||||
}
|
||||
else
|
||||
{
|
||||
doPickupDestroy(pPickupActor, nItem);
|
||||
}
|
||||
|
||||
doPickupNotification(pPlayer, nItem, StaticSound[kSoundAmmoPickup]);
|
||||
}
|
||||
break;
|
||||
|
||||
case 10: // Pickable item
|
||||
|
|
Loading…
Reference in a new issue