From 9891f3f5affaab36332ddef4222a7e787822e206 Mon Sep 17 00:00:00 2001 From: BjossiAlfreds Date: Sat, 24 Sep 2022 12:11:16 +0000 Subject: [PATCH] Fix items already in water at level start playing splash sound --- src/game/g_phys.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/game/g_phys.c b/src/game/g_phys.c index 70f6fdb4..bffc93a9 100644 --- a/src/game/g_phys.c +++ b/src/game/g_phys.c @@ -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) {