mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 07:57:52 +00:00
Don't play a terrain splash if the player didn't take damage.
This commit is contained in:
parent
a87a86198c
commit
8a428e69b6
1 changed files with 3 additions and 2 deletions
|
@ -738,12 +738,13 @@ void P_PlayerOnSpecialFlat (player_t *player, int floorType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int damage = 0;
|
||||||
if (ironfeet == NULL)
|
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);
|
Terrains[floorType].DamageMOD);
|
||||||
}
|
}
|
||||||
if (Terrains[floorType].Splash != -1)
|
if (damage > 0 && Terrains[floorType].Splash != -1)
|
||||||
{
|
{
|
||||||
S_Sound (player->mo, CHAN_AUTO,
|
S_Sound (player->mo, CHAN_AUTO,
|
||||||
Splashes[Terrains[floorType].Splash].NormalSplashSound, 1,
|
Splashes[Terrains[floorType].Splash].NormalSplashSound, 1,
|
||||||
|
|
Loading…
Reference in a new issue