Fix items already in water at level start playing splash sound

This commit is contained in:
BjossiAlfreds 2022-09-24 12:11:16 +00:00
parent e29d37956a
commit 9891f3f5af

View file

@ -1005,8 +1005,12 @@ SV_Physics_Toss(edict_t *ent)
if (!wasinwater && isinwater)
{
gi.positioned_sound(old_origin, g_edicts, CHAN_AUTO,
gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
/* don't play splash sound for entities already in water on level start */
if (level.framenum > 3)
{
gi.positioned_sound(old_origin, g_edicts, CHAN_AUTO,
gi.soundindex("misc/h2ohit1.wav"), 1, 1, 0);
}
}
else if (wasinwater && !isinwater)
{