add check for updating the effect radar only when it is enabled (to reduce lag)

This commit is contained in:
Hersi 2023-11-23 12:21:17 +01:00
parent 4f3131a388
commit d0b1bcfb79
1 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ game.LoadSkinSample('song_wheel/diff_change.wav')
local scoreNumbers = Numbers.load_number_image("score_num")
local difficultyNumbers = Numbers.load_number_image("diff_num")
local songselect_showEffectRadar = game.GetSkinSetting("songselect_showEffectRadar") or false
local showEffectRadar = game.GetSkinSetting("songselect_showEffectRadar") or false
local LEADERBOARD_PLACE_NAMES = {
'1st',
@ -1053,7 +1053,7 @@ end
---This function is basically a workaround for the ForceRender call
local function drawRadar()
if not songselect_showEffectRadar then return end
if not showEffectRadar then return end
if isFilterWheelActive or transitionLeaveScale ~= 0 then return end
local x, y = 375, 650
@ -1125,7 +1125,7 @@ render = function (deltaTime)
Sound.stopMusic()
if updateRadar then
if showEffectRadar and updateRadar then
local difficultyNames = {"nov","adv","exh","mxm","inf","grv","hvn","vvd","exc"}
local diff = songwheel.songs[selectedIndex].difficulties[selectedDifficulty].difficulty + 1
radar:updateGraph(songwheel.songs[selectedIndex].path, difficultyNames[diff])