From ce2a40ba9ba5c7bc8f56b2d3e00d66070c4e7b4e Mon Sep 17 00:00:00 2001 From: "born a rick, raised a morty, died a jerry" Date: Sat, 1 Dec 2018 13:18:40 -0500 Subject: [PATCH] dont keep unloading replaydata when doing anything with it --- Themes/Til Death/BGAnimations/offsetplot.lua | 1 - src/HighScore.cpp | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/Themes/Til Death/BGAnimations/offsetplot.lua b/Themes/Til Death/BGAnimations/offsetplot.lua index fa28529435..16caa8aa81 100644 --- a/Themes/Til Death/BGAnimations/offsetplot.lua +++ b/Themes/Til Death/BGAnimations/offsetplot.lua @@ -55,7 +55,6 @@ local o = nrt = pss:GetNoteRowVector() ctt = pss:GetTrackVector() -- column information for each offset ntt = pss:GetTapNoteTypeVector() -- notetype information (we use this to handle mine hits differently- currently that means not displaying them) - pss:UnloadReplayData() -- force unload replaydata in memory after loading it (not sure if i should allow this but i don't trust deconstructors) -mina elseif name == "ScreenScoreTabOffsetPlot" then -- loaded from scoretab not eval so we need to read from disk and adjust plot display plotWidth, plotHeight = SCREEN_WIDTH, SCREEN_WIDTH * 0.3 self:xy(SCREEN_CENTER_X, SCREEN_CENTER_Y) diff --git a/src/HighScore.cpp b/src/HighScore.cpp index 717554c2e3..89da99f005 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -1788,7 +1788,6 @@ HighScore::RescoreToWifeJudgeDuringLoad(int x) } float o = p / pmax; - UnloadReplayData(); return o; } @@ -2043,8 +2042,6 @@ class LunaHighScore : public Luna for (size_t i = 0; i < v.size(); ++i) v[i] = v[i] * 1000; LuaHelpers::CreateTableFromArray(v, L); - if (!loaded) - p->UnloadReplayData(); } else lua_pushnil(L); return 1; @@ -2055,11 +2052,7 @@ class LunaHighScore : public Luna auto* v = &(p->GetNoteRowVector()); bool loaded = v->size() > 0; if (loaded || p->LoadReplayData()) { - if (!loaded) - v = &(p->GetNoteRowVector()); LuaHelpers::CreateTableFromArray((*v), L); - if (!loaded) - p->UnloadReplayData(); } else lua_pushnil(L); return 1; @@ -2073,8 +2066,6 @@ class LunaHighScore : public Luna if (!loaded) v = &(p->GetTrackVector()); LuaHelpers::CreateTableFromArray((*v), L); - if (!loaded) - p->UnloadReplayData(); } else lua_pushnil(L); return 1; @@ -2088,8 +2079,6 @@ class LunaHighScore : public Luna if (!loaded) v = &(p->GetTapNoteTypeVector()); LuaHelpers::CreateTableFromArray((*v), L); - if (!loaded) - p->UnloadReplayData(); } else lua_pushnil(L); return 1;