Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blood: Don't reequip single handed weapons for akimbo powerup #856

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions source/blood/src/actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4728,7 +4728,6 @@ void MoveDude(spritetype *pSprite)
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &gillBeastSwimGoto);

pSprite->flags &= ~6;
break;
case kDudeGargoyleFlesh:
Expand Down Expand Up @@ -4765,77 +4764,6 @@ void MoveDude(spritetype *pSprite)
}
break;
}
/*case 13:
pXSprite->medium = kMediumGoo;
if (pPlayer)
{
pPlayer->changeTargetKin = 1;
pXSprite->burnTime = 0;
pPlayer->bubbleTime = klabs(zvel[nSprite])>>12;
evPost(nSprite, 3, 0, kCallbackPlayerBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
}
else
{
switch (pSprite->type)
{
case kDudeCultistTommy:
case kDudeCultistShotgun:
pXSprite->burnTime = 0;
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &cultistSwimGoto);
break;
case kDudeBurningCultist:
if (Chance(0x400))
{
pSprite->type = kDudeCultistTommy;
pXSprite->burnTime = 0;
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &cultistSwimGoto);
}
else
{
pSprite->type = kDudeCultistShotgun;
pXSprite->burnTime = 0;
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &cultistSwimGoto);
}
break;
case kDudeZombieAxeNormal:
pXSprite->burnTime = 0;
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &zombieAGoto);
break;
case kDudeZombieButcher:
pXSprite->burnTime = 0;
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &zombieFGoto);
break;
case kDudeGillBeast:
pXSprite->burnTime = 0;
evPost(nSprite, 3, 0, kCallbackEnemeyBubble);
sfxPlay3DSound(pSprite, 720, -1, 0);
aiNewState(pSprite, pXSprite, &gillBeastSwimGoto);
pSprite->flags &= ~6;
break;
case kDudeGargoyleFlesh:
case kDudeHellHound:
case kDudeSpiderBrown:
case kDudeSpiderRed:
case kDudeSpiderBlack:
case kDudeBat:
case kDudeRat:
case kDudeBurningInnocent:
actKillDude(pSprite->index, pSprite, kDamageFall, 1000<<4);
break;
}
}
break;*/
}
}
GetSpriteExtents(pSprite, &top, &bottom);
Expand Down
19 changes: 19 additions & 0 deletions source/blood/src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,21 @@ int powerupCheck(PLAYER *pPlayer, int nPowerUp)
return pPlayer->pwUpTime[nPowerUp];
}

char powerupAkimboWeapons(int nWeapon)
{
switch (nWeapon)
{
case kWeaponFlare:
case kWeaponShotgun:
case kWeaponTommy:
case kWeaponNapalm:
case kWeaponTesla:
return 1;
default:
break;
}
return 0;
}

char powerupActivate(PLAYER *pPlayer, int nPowerUp)
{
Expand Down Expand Up @@ -462,6 +477,8 @@ char powerupActivate(PLAYER *pPlayer, int nPowerUp)
pPlayer->damageControl[kDamageBurn]++;
break;
case kItemTwoGuns:
if (!VanillaMode() && !powerupAkimboWeapons(pPlayer->curWeapon)) // if weapon doesn't have a akimbo state, don't raise weapon
break;
pPlayer->input.newWeapon = pPlayer->curWeapon;
WeaponRaise(pPlayer);
break;
Expand Down Expand Up @@ -513,6 +530,8 @@ void powerupDeactivate(PLAYER *pPlayer, int nPowerUp)
pPlayer->damageControl[kDamageBurn]--;
break;
case kItemTwoGuns:
if (!VanillaMode() && !powerupAkimboWeapons(pPlayer->curWeapon)) // if weapon doesn't have a akimbo state, don't raise weapon
break;
pPlayer->input.newWeapon = pPlayer->curWeapon;
WeaponRaise(pPlayer);
break;
Expand Down