From 9ab34466cd5b3e2ca1e6924cad9a3b4345841a77 Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:17:42 +1000 Subject: [PATCH 1/2] Blood: Don't reequip single handed weapons for akimbo powerup --- source/blood/src/player.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index f624341220..e0f22511ce 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -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) { @@ -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; @@ -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; From 22d23eeee92c9a875ec100392f78e95c874215bb Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Wed, 23 Oct 2024 06:29:32 +1000 Subject: [PATCH 2/2] Blood: Clear commented code from MoveDude() refactor --- source/blood/src/actor.cpp | 72 -------------------------------------- 1 file changed, 72 deletions(-) diff --git a/source/blood/src/actor.cpp b/source/blood/src/actor.cpp index 370f75cbb3..c36a5a43ac 100644 --- a/source/blood/src/actor.cpp +++ b/source/blood/src/actor.cpp @@ -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: @@ -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);