From 151c76e6f9dd4a87c2bcf6df9d8c6a075150783b Mon Sep 17 00:00:00 2001 From: Barinade Date: Sun, 9 Jun 2019 01:49:30 -0500 Subject: [PATCH] Remove artificial slowness of random song picker Seeding the rng with the system clock in this way always provides the exact same result per second, since os.time gives a second value. If we are going to seed it, it needs to be ms value instead or not at all. --- .../BGAnimations/ScreenSelectMusic overlay/currentsort.lua | 1 - .../Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua | 1 - 2 files changed, 2 deletions(-) diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/currentsort.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/currentsort.lua index 3e8b7c130f..ac9bfd734b 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/currentsort.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/currentsort.lua @@ -86,7 +86,6 @@ t[#t + 1] = end, MouseLeftClickMessageCommand = function(self) if group_rand ~= "" and isOver(self) then - math.randomseed(os.time()) local t = SONGMAN:GetSongsInGroup(group_rand) local random_song = t[math.random(#t)] SCREENMAN:GetTopScreen():GetMusicWheel():SelectSong(random_song) diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua index d433d876dd..14031ae8e5 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic overlay/default.lua @@ -81,7 +81,6 @@ t[#t + 1] = end, MouseLeftClickMessageCommand = function(self) if isOver(self) then - math.randomseed(os.time()) local t = SONGMAN:GetAllSongs() local random_song = t[math.random(#t)] SCREENMAN:GetTopScreen():GetMusicWheel():SelectSong(random_song)