Skip to content

Commit

Permalink
fix up enforced 180 ms boo window for recalled offset plots
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Nov 14, 2017
1 parent d791e9f commit 903375c
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local plotWidth, plotHeight = SCREEN_WIDTH,SCREEN_WIDTH*0.3
local plotX, plotY = SCREEN_CENTER_X, SCREEN_CENTER_Y
local dotDims, plotMargin = 2, 4
local judge = GetTimingDifficulty()
local maxOffset = 180*tst[judge]
local maxOffset = math.max(180, 180*tst[judge])

local o = Def.ActorFrame{
InitCommand=function(self)
Expand All @@ -22,7 +22,7 @@ local o = Def.ActorFrame{
elseif params.Name == "NextJudge" and judge < 9 then
judge = judge + 1
end
maxOffset = 180*tst[judge]
maxOffset = math.max(180, 180*tst[judge])
MESSAGEMAN:Broadcast("JudgeDisplayChanged")
end
}
Expand All @@ -42,9 +42,11 @@ end

local function plotOffset(nr,dv)
if dv == 1000 then -- 1000 denotes a miss for which we use a different marker
return Def.Quad{InitCommand=function(self)
self:xy(fitX(nr),fitY(tst[judge]*184)):zoomto(dotDims,dotDims):diffuse(offsetToJudgeColor(dv/1000)):valign(0)
end}
return Def.Quad{
InitCommand=function(self)
self:xy(fitX(nr),fitY(math.max(184, tst[judge]*184))):zoomto(dotDims,dotDims):diffuse(offsetToJudgeColor(dv/1000)):valign(0)
end
}
end
return Def.Quad{
InitCommand=function(self)
Expand All @@ -53,7 +55,7 @@ local function plotOffset(nr,dv)
JudgeDisplayChangedMessageCommand=function(self)
local pos = fitY(dv)
if math.abs(pos) > plotHeight/2 then
self:y(fitY(tst[judge]*184))
self:y(fitY(math.max(184, tst[judge]*184)))
else
self:y(pos)
end
Expand Down

0 comments on commit 903375c

Please sign in to comment.