Skip to content

Commit

Permalink
clumsily handle offset plot issues with new max 180 boo window
Browse files Browse the repository at this point in the history
there's got to be a better way to handle this but i can't think of one off the top of my head
  • Loading branch information
MinaciousGrace committed Nov 11, 2017
1 parent 1864e48 commit 8e08eb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Themes/Til Death/BGAnimations/offsetplot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ local o = Def.ActorFrame{
judge = enabledCustomWindows and 0 or GetTimingDifficulty()
tso = tst[GetTimingDifficulty()]
end
maxOffset = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo or 180*tso
maxOffset = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo or math.max(180, 180*tso)
MESSAGEMAN:Broadcast("JudgeDisplayChanged")
end,
}
Expand Down Expand Up @@ -124,7 +124,7 @@ o[#o+1] = Def.ActorMultiVertex{
local x = fitX(wuab[i]);
local y = fitY(dvt[i]);
if math.abs(y) > plotHeight/2 then
y = fitY(tso*183);
y = fitY(math.max(183, 183*tso));
end
verts[#verts+1] = {{x-dotWidth,y+dotWidth,0}, color}
verts[#verts+1] = {{x+dotWidth,y+dotWidth,0}, color}
Expand All @@ -139,7 +139,7 @@ o[#o+1] = Def.ActorMultiVertex{
for i=1,#nrt do
local x = fitX(wuab[i]);
local y = fitY(dvt[i]);
local fit = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo + 3 or tso*183
local fit = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo + 3 or math.max(183, 183*tso)
local color = (enabledCustomWindows and judge ~= 0) and customOffsetToJudgeColor(dvt[i], customWindow.judgeWindows) or offsetToJudgeColor(dvt[i]/1000, tst[judge]);
if math.abs(y) > plotHeight/2 then
y = fitY(fit);
Expand Down
1 change: 1 addition & 0 deletions Themes/Til Death/Scripts/Scores.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ function getRescoredJudge(offsetVector, judgeScale, judge)
local tso = { 1.50, 1.33, 1.16, 1.00, 0.84, 0.66, 0.50, 0.33, 0.20 }
local ts = tso[judgeScale]
local windows = { 22.5, 45.0, 90.0, 135.0, 180.0, 500.0 }
windows[5] = math.max(windows[5], 180.0)
local lowerBound = judge > 1 and windows[judge - 1] * ts or -1.0
local upperBound = windows[judge] * ts
local judgeCount = 0
Expand Down

0 comments on commit 8e08eb5

Please sign in to comment.