From dcf0155fa3f243ddf0097b686344d4665fa7f9c9 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sat, 7 Jan 2012 17:19:11 -0600 Subject: [PATCH] if there are over 150 segments, don't show any of them because it will cause laaaaaaaaag --- .../BGAnimations/ScreenGameplay decorations/default.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua index d3afe670f1..0311d6e8f2 100644 --- a/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua +++ b/Themes/default/BGAnimations/ScreenGameplay decorations/default.lua @@ -1,3 +1,5 @@ +local maxSegments = 150 + local function CreateSegments(Player) local t = Def.ActorFrame { }; local bars = Def.ActorFrame{ }; @@ -36,6 +38,12 @@ local function CreateSegments(Player) local scrolls = timingData:GetScrolls(); local speeds = timingData:GetSpeeds(); + -- we don't want too many segments to be shown. + local sumSegments = bpms + stops + delays + warps + fakes + scrolls + speeds + if sumSegments > maxSegments then + return Def.ActorFrame{} + end + local function CreateLine(beat, secs, firstShadow, firstDiffuse, secondShadow, firstEffect, secondEffect) local beatTime = timingData:GetElapsedTimeFromBeat(beat); if beatTime < 0 then beatTime = 0; end;