Merge pull request #96 from BjossiAlfreds/splashes

Fix items already in water at level start playing splash sound
This commit is contained in:
Yamagi 2022-10-08 15:37:27 +02:00 committed by GitHub
commit f15c5c57a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -990,7 +990,11 @@ 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)
{