Don't play a terrain splash if the player didn't take damage.

This commit is contained in:
Eevee (Alex Munroe) 2015-06-06 15:31:12 -07:00
parent a87a86198c
commit 8a428e69b6

View file

@ -738,12 +738,13 @@ void P_PlayerOnSpecialFlat (player_t *player, int floorType)
}
}
int damage = 0;
if (ironfeet == NULL)
{
P_DamageMobj (player->mo, NULL, NULL, Terrains[floorType].DamageAmount,
damage = P_DamageMobj (player->mo, NULL, NULL, Terrains[floorType].DamageAmount,
Terrains[floorType].DamageMOD);
}
if (Terrains[floorType].Splash != -1)
if (damage > 0 && Terrains[floorType].Splash != -1)
{
S_Sound (player->mo, CHAN_AUTO,
Splashes[Terrains[floorType].Splash].NormalSplashSound, 1,