@@ -28,9 +28,6 @@ if not CurSong then CurSong = 1 end
2828-- We define the current group to be empty if no group is defined.
2929if not CurGroup then GurGroup = " " end
3030
31- -- The player joined.
32- if not Joined then Joined = {} end
33-
3431-- The current row of 7 songs that are being displayed.
3532local CurRow = 1
3633
@@ -425,7 +422,7 @@ local function StartSelection(self,Songs)
425422 end
426423
427424 -- If player 1 is joined.
428- if Joined [ PLAYER_1 ] then
425+ if GAMESTATE : IsSideJoined ( PLAYER_1 ) then
429426
430427 -- Show the difficulty border on the left side of the selector.
431428 self :GetChild (" Diffs" ):GetChild (" DiffSelector" .. i .. " 1" ):GetChild (" DiffCon" ):sleep (.5 ):linear (.5 ):diffuse (DiffColors [TF_WHEEL .DiffTab [Songs [CurSong ][i + 1 ]:GetDifficulty ()]])
@@ -435,7 +432,7 @@ local function StartSelection(self,Songs)
435432 end
436433
437434 -- If player 2 is joined
438- if Joined [ PLAYER_2 ] then
435+ if GAMESTATE : IsSideJoined ( PLAYER_2 ) then
439436
440437 -- Show the difficulty border on the right side of the selector.
441438 self :GetChild (" Diffs" ):GetChild (" DiffSelector" .. i .. " 2" ):GetChild (" DiffCon" ):sleep (.5 ):linear (.5 ):diffuse (DiffColors [TF_WHEEL .DiffTab [Songs [CurSong ][i + 1 ]:GetDifficulty ()]])
@@ -459,7 +456,7 @@ local function MoveDifficulty(self,offset,Songs)
459456 if self .pn == PLAYER_2 then pn = 2 end
460457
461458 -- If player is joined, let them change the difficulty.
462- if Joined [ self .pn ] then
459+ if GAMESTATE : IsSideJoined ( self .pn ) then
463460
464461 -- For all difficulties that are used stop the blink.
465462 for i = 1 ,6 do
@@ -788,11 +785,10 @@ return function(Style)
788785 -- Do stuff when a user presses the Back on Pad or Menu buttons.
789786 BackCommand = function (self )
790787 -- Check if User is joined.
791- if Joined [ self .pn ] then
792- if Joined [ PLAYER_1 ] and Joined [ PLAYER_2 ] then
788+ if GAMESTATE : IsSideJoined ( self .pn ) then
789+ if GAMESTATE : IsSideJoined ( PLAYER_1 ) and GAMESTATE : IsSideJoined ( PLAYER_2 ) then
793790 -- If both players are joined, We want to unjoin the player that pressed back.
794791 GAMESTATE :UnjoinPlayer (self .pn )
795- Joined [self .pn ] = false
796792 else
797793 -- Go to the previous screen.
798794 SCREENMAN :GetTopScreen ():SetNextScreenName (SCREENMAN :GetTopScreen ():GetPrevScreenName ()):StartTransitioningScreen (" SM_GoToNextScreen" )
@@ -811,7 +807,7 @@ return function(Style)
811807 SCREENMAN :GetTopScreen ():SetNextScreenName (" ScreenPlayerOptions" ):StartTransitioningScreen (" SM_GoToNextScreen" )
812808 end
813809 -- Check if player is joined.
814- if Joined [ self .pn ] then
810+ if GAMESTATE : IsSideJoined ( self .pn ) then
815811
816812 -- We use PlayMode_Regular for now.
817813 GAMESTATE :SetCurrentPlayMode (" PlayMode_Regular" )
@@ -820,7 +816,7 @@ return function(Style)
820816 GAMESTATE :SetCurrentSong (GroupsAndSongs [CurSong ][1 ])
821817
822818 -- Check if 2 players are joined.
823- if Joined [ PLAYER_1 ] and Joined [ PLAYER_2 ] then
819+ if GAMESTATE : IsSideJoined ( PLAYER_1 ) and GAMESTATE : IsSideJoined ( PLAYER_2 ) then
824820
825821 -- If they are, We will use Versus.
826822 GAMESTATE :SetCurrentStyle (' versus' )
@@ -857,7 +853,7 @@ return function(Style)
857853 if UnlockedInput then
858854
859855 -- Check if player is joined.
860- if Joined [ self .pn ] then
856+ if GAMESTATE : IsSideJoined ( self .pn ) then
861857
862858 -- Check if we are on a group.
863859 if type (GroupsAndSongs [CurSong ]) == " string" then
@@ -900,9 +896,6 @@ return function(Style)
900896
901897 -- Load the profles.
902898 GAMESTATE :LoadProfiles ()
903-
904- -- Add to joined list.
905- Joined [self .pn ] = true
906899 end
907900 end
908901 end
@@ -921,8 +914,8 @@ return function(Style)
921914 DiffSelection = true
922915
923916 -- Set the first value in the difficulty selector active.
924- if Joined [ PLAYER_1 ] then self :GetChild (" Diffs" ):GetChild (" DiffSelector11" ):effectclock (" Beat" ):glowshift () end
925- if Joined [ PLAYER_2 ] then self :GetChild (" Diffs" ):GetChild (" DiffSelector12" ):effectclock (" Beat" ):glowshift () end
917+ if GAMESTATE : IsSideJoined ( PLAYER_1 ) then self :GetChild (" Diffs" ):GetChild (" DiffSelector11" ):effectclock (" Beat" ):glowshift () end
918+ if GAMESTATE : IsSideJoined ( PLAYER_2 ) then self :GetChild (" Diffs" ):GetChild (" DiffSelector12" ):effectclock (" Beat" ):glowshift () end
926919 end ,
927920
928921 Slider , -- Load the sliders
0 commit comments