Fixed monitors not making sounds if you had that monitor already and it wasn't mariomode.

This commit is contained in:
toasterbabe 2016-10-13 15:13:33 +01:00
parent 05aefc3ede
commit 6e47a07a04
2 changed files with 13 additions and 9 deletions

View File

@ -3060,7 +3060,7 @@ void A_JumpShield(mobj_t *actor)
if (P_SwitchShield(player, SH_JUMP))
S_StartSound(player->mo, actor->info->seesound);
else if (mariomode)
else
S_StartSound(player->mo, sfx_itemup);
}
@ -3089,7 +3089,7 @@ void A_RingShield(mobj_t *actor)
if (P_SwitchShield(player, SH_ATTRACT))
S_StartSound(player->mo, actor->info->seesound);
else if (mariomode)
else
S_StartSound(player->mo, sfx_itemup);
}
@ -3319,7 +3319,7 @@ void A_WaterShield(mobj_t *actor)
if (P_SwitchShield(player, SH_ELEMENTAL))
S_StartSound(player->mo, actor->info->seesound);
else if (mariomode)
else
S_StartSound(player->mo, sfx_itemup);
if (player->powers[pw_underwater] && player->powers[pw_underwater] <= 12*TICRATE + 1)
@ -3384,7 +3384,9 @@ void A_ForceShield(mobj_t *actor)
S_StartSound(player->mo, actor->info->seesound);
}
else if (mariomode)
else if (!mariomode)
S_StartSound(player->mo, actor->info->seesound);
else
S_StartSound(player->mo, sfx_itemup);
if ((player->powers[pw_shield] & SH_FORCE) && (player->powers[pw_shield] & SH_FORCEHP))
@ -3429,7 +3431,7 @@ void A_PityShield(mobj_t *actor)
if (P_SwitchShield(player, SH_PITY))
S_StartSound(player->mo, actor->info->seesound);
else if (mariomode)
else
S_StartSound(player->mo, sfx_itemup);
}

View File

@ -1428,9 +1428,11 @@ void P_SpawnShieldOrb(player_t *player)
//
// P_SwitchShield
//
// Handles the possibility of switching
// between shields thoroughly, then
// adds the desired one.
// Handles the possibility of switching between
// the non-stack layer of shields thoroughly,
// then adds the desired one.
//
// Returns whether to play a normal sound or an itemup.
//
// Not for use if shieldtype would be SH_FORCE.
//
@ -1477,7 +1479,7 @@ boolean P_SwitchShield(player_t *player, UINT16 shieldtype)
P_SpawnShieldOrb(player);
return true;
}
return false;
return (!mariomode);
}
//