Skip to content

Commit

Permalink
convert downloaded replay offsets to 1sec if they are 180ms
Browse files Browse the repository at this point in the history
eo gives back 1000ms misses as if they are 180ms bads which is not cool and this attempts to fix it. in reality it actually is possible to hit a 180ms bad which means this is wrong to do but its the best we can do i think
  • Loading branch information
poco0317 committed Nov 19, 2021
1 parent 447700a commit 54b123f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Themes/_fallback/Scripts/10 WifeSundries.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ function wifeMean(t)
end
local o = 0
for i = 1, c do
-- ignore EO misses and replay mines
if t[i] ~= 1000 and t[i] ~= -1100 then
o = o + t[i]
else
Expand All @@ -268,6 +269,7 @@ function wifeAbsMean(t)
end
local o = 0
for i = 1, c do
-- ignore EO misses and replay mines
if t[i] ~= 1000 and t[i] ~= -1100 then
o = o + math.abs(t[i])
else
Expand All @@ -282,6 +284,7 @@ function wifeSd(t)
local u2 = 0
local m = 0
for i = 1, #t do
-- ignore EO misses and replay mines
if t[i] ~= 1000 and t[i] ~= -1100 then
u2 = u2 + (t[i] - u) ^ 2
else
Expand Down
8 changes: 7 additions & 1 deletion src/Etterna/Singletons/DownloadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,13 @@ DownloadManager::RequestReplayData(const string& scoreid,
std::make_pair(note[0].GetFloat(), note[1].GetFloat()));

timestamps.push_back(note[0].GetFloat());
offsets.push_back(note[1].GetFloat() / 1000.f);
// horrid temp hack --
// EO keeps misses as 180ms bads for not a great reason
// convert them back to misses here
auto offset = note[1].GetFloat() / 1000.F;
if (offset == .18F)
offset = 1.F;
offsets.push_back(offset);
if (note.Size() == 3 &&
note[2].IsInt()) { // pre-0.6 with noterows
rows.push_back(note[2].GetInt());
Expand Down

0 comments on commit 54b123f

Please sign in to comment.