add check for updating the effect radar only when it is enabled (to reduce lag)
This commit is contained in:
parent
4f3131a388
commit
d0b1bcfb79
|
@ -114,7 +114,7 @@ game.LoadSkinSample('song_wheel/diff_change.wav')
|
||||||
local scoreNumbers = Numbers.load_number_image("score_num")
|
local scoreNumbers = Numbers.load_number_image("score_num")
|
||||||
local difficultyNumbers = Numbers.load_number_image("diff_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 = {
|
local LEADERBOARD_PLACE_NAMES = {
|
||||||
'1st',
|
'1st',
|
||||||
|
@ -1053,7 +1053,7 @@ end
|
||||||
|
|
||||||
---This function is basically a workaround for the ForceRender call
|
---This function is basically a workaround for the ForceRender call
|
||||||
local function drawRadar()
|
local function drawRadar()
|
||||||
if not songselect_showEffectRadar then return end
|
if not showEffectRadar then return end
|
||||||
if isFilterWheelActive or transitionLeaveScale ~= 0 then return end
|
if isFilterWheelActive or transitionLeaveScale ~= 0 then return end
|
||||||
|
|
||||||
local x, y = 375, 650
|
local x, y = 375, 650
|
||||||
|
@ -1125,7 +1125,7 @@ render = function (deltaTime)
|
||||||
|
|
||||||
Sound.stopMusic()
|
Sound.stopMusic()
|
||||||
|
|
||||||
if updateRadar then
|
if showEffectRadar and updateRadar then
|
||||||
local difficultyNames = {"nov","adv","exh","mxm","inf","grv","hvn","vvd","exc"}
|
local difficultyNames = {"nov","adv","exh","mxm","inf","grv","hvn","vvd","exc"}
|
||||||
local diff = songwheel.songs[selectedIndex].difficulties[selectedDifficulty].difficulty + 1
|
local diff = songwheel.songs[selectedIndex].difficulties[selectedDifficulty].difficulty + 1
|
||||||
radar:updateGraph(songwheel.songs[selectedIndex].path, difficultyNames[diff])
|
radar:updateGraph(songwheel.songs[selectedIndex].path, difficultyNames[diff])
|
||||||
|
|
Loading…
Reference in New Issue