[Scummvm-git-logs] scummvm master -> ec80f5e5ca334ea845b1e823aa3115245d64d279

AndywinXp noreply at scummvm.org
Sun Nov 1 20:34:28 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
ec80f5e5ca GRIM: Patch vd.lua script


Commit: ec80f5e5ca334ea845b1e823aa3115245d64d279
    https://github.com/scummvm/scummvm/commit/ec80f5e5ca334ea845b1e823aa3115245d64d279
Author: AndywinXp (andywinxp at gmail.com)
Date: 2026-11-01T21:34:18+01:00

Commit Message:
GRIM: Patch vd.lua script

vd.play_wheel_sfx started a wheel sound almost every time it was called,
because the "not" in its condition applied only to the first
sound_playing() call. The wheel sounds filled all the iMUSE tracks, so
the tumbler sounds (lower priority) couldn't start and
Tumbler.make_noise spun without yielding, stalling the game.

Move the "not" after the whole expression, as the remastered script does,
so a new wheel sound is started only when none of them is playing.

Basically, from:
if not sound_playing("vdWeel1.wav") or sound_playing("vdWeel2.wav") or
sound_playing("vdWeel3.wav") or sound_playing("vdWeel4.wav") then

to:
if not (sound_playing("vdWeel1.wav") or sound_playing("vdWeel2.wav") or
sound_playing("vdWeel3.wav") or sound_playing("vdWeel4.wav")) then

Changed paths:
    dists/engine-data/grim-patch.lab
    dists/engine-data/patches/GrimPatchesDesc.txt
    dists/engine-data/patches/grim/vd.lua.patchr


diff --git a/dists/engine-data/grim-patch.lab b/dists/engine-data/grim-patch.lab
index fd3da2f725d..d7e9f903062 100644
Binary files a/dists/engine-data/grim-patch.lab and b/dists/engine-data/grim-patch.lab differ
diff --git a/dists/engine-data/patches/GrimPatchesDesc.txt b/dists/engine-data/patches/GrimPatchesDesc.txt
index 3bf803f4236..e58ec20dd1d 100644
--- a/dists/engine-data/patches/GrimPatchesDesc.txt
+++ b/dists/engine-data/patches/GrimPatchesDesc.txt
@@ -191,6 +191,15 @@ List of fixed bugs in GF scripts:
 	the key '2' which means "play and endpause". This patch adds a 'manny:stop_chore' call after the chore has
 	done.
 
+	Fix lag and starved sounds in the safe tumblers puzzle - vd.lua.patchr
+	The function 'vd.play_wheel_sfx' starts a wheel sound with
+	'if not sound_playing("vdWeel1.wav") or sound_playing("vdWeel2.wav") or ...'. Because of the operator precedence
+	the 'not' applies only to the first call, so a new sound is started almost every time the function is called
+	(twice per frame while the wheel is turning). Those sounds take all the iMUSE tracks with priority 64, so the
+	tumbler sounds, which have priority 0, can't start, and 'Tumbler.make_noise' loops without yielding until a track
+	frees up, stalling the game. This patch moves the 'not' after the whole expression, like the remastered version
+	of the script does, so a new wheel sound is started only when none of them is playing.
+
 	Fix Manny's walking backwards animation - ma_back_off.key.patchr
 	The animation has 16 frames, but the 16th frame looks the same at the 15th one so we just say that it only
 	has 15 frames.
diff --git a/dists/engine-data/patches/grim/vd.lua.patchr b/dists/engine-data/patches/grim/vd.lua.patchr
index fa4ca09a80d..7c8fa77cb43 100644
Binary files a/dists/engine-data/patches/grim/vd.lua.patchr and b/dists/engine-data/patches/grim/vd.lua.patchr differ




More information about the Scummvm-git-logs mailing list