if there are over 150 segments, don't show any of them because it will cause laaaaaaaaag
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
local maxSegments = 150
|
||||||
|
|
||||||
local function CreateSegments(Player)
|
local function CreateSegments(Player)
|
||||||
local t = Def.ActorFrame { };
|
local t = Def.ActorFrame { };
|
||||||
local bars = Def.ActorFrame{ };
|
local bars = Def.ActorFrame{ };
|
||||||
@@ -36,6 +38,12 @@ local function CreateSegments(Player)
|
|||||||
local scrolls = timingData:GetScrolls();
|
local scrolls = timingData:GetScrolls();
|
||||||
local speeds = timingData:GetSpeeds();
|
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 function CreateLine(beat, secs, firstShadow, firstDiffuse, secondShadow, firstEffect, secondEffect)
|
||||||
local beatTime = timingData:GetElapsedTimeFromBeat(beat);
|
local beatTime = timingData:GetElapsedTimeFromBeat(beat);
|
||||||
if beatTime < 0 then beatTime = 0; end;
|
if beatTime < 0 then beatTime = 0; end;
|
||||||
|
|||||||
Reference in New Issue
Block a user