From e8c208395d93ff3a52f336b5268aaea730d55d02 Mon Sep 17 00:00:00 2001 From: Kyzentun Date: Sat, 29 Nov 2014 12:59:51 -0700 Subject: [PATCH] Fixed DeltaSeconds actor in timed courses to check whether the pref for the delta exists. --- Themes/default/Graphics/ScreenGameplay DeltaSeconds.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Themes/default/Graphics/ScreenGameplay DeltaSeconds.lua b/Themes/default/Graphics/ScreenGameplay DeltaSeconds.lua index 9bdf5d30ec..5fb8b287d6 100644 --- a/Themes/default/Graphics/ScreenGameplay DeltaSeconds.lua +++ b/Themes/default/Graphics/ScreenGameplay DeltaSeconds.lua @@ -8,9 +8,12 @@ local t = LoadFont("ScreenGameplay","RemainingTime") .. { if params.Player == PlayerNumber then if params.TapNoteScore then local tns = ToEnumShortString(params.TapNoteScore) - self:playcommand( "GainSeconds" ); - self:playcommand( tns ); - self:settextf( "%+1.1fs", PREFSMAN:GetPreference( string.format("TimeMeterSecondsChange%s", tns) ) ); + local prefname= ("TimeMeterSecondsChange%s"):format(tns) + if PREFSMAN:PreferenceExists(prefname) then + self:playcommand( "GainSeconds" ); + self:playcommand( tns ); + self:settextf( "%+1.1fs", PREFSMAN:GetPreference(prefname) ); + end else return end