@@ -28,9 +28,6 @@ if not CurSong then CurSong = 1 end
28
28
-- We define the current group to be empty if no group is defined.
29
29
if not CurGroup then GurGroup = " " end
30
30
31
- -- The player joined.
32
- if not Joined then Joined = {} end
33
-
34
31
-- The current row of 7 songs that are being displayed.
35
32
local CurRow = 1
36
33
@@ -425,7 +422,7 @@ local function StartSelection(self,Songs)
425
422
end
426
423
427
424
-- If player 1 is joined.
428
- if Joined [ PLAYER_1 ] then
425
+ if GAMESTATE : IsSideJoined ( PLAYER_1 ) then
429
426
430
427
-- Show the difficulty border on the left side of the selector.
431
428
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)
435
432
end
436
433
437
434
-- If player 2 is joined
438
- if Joined [ PLAYER_2 ] then
435
+ if GAMESTATE : IsSideJoined ( PLAYER_2 ) then
439
436
440
437
-- Show the difficulty border on the right side of the selector.
441
438
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)
459
456
if self .pn == PLAYER_2 then pn = 2 end
460
457
461
458
-- If player is joined, let them change the difficulty.
462
- if Joined [ self .pn ] then
459
+ if GAMESTATE : IsSideJoined ( self .pn ) then
463
460
464
461
-- For all difficulties that are used stop the blink.
465
462
for i = 1 ,6 do
@@ -788,11 +785,10 @@ return function(Style)
788
785
-- Do stuff when a user presses the Back on Pad or Menu buttons.
789
786
BackCommand = function (self )
790
787
-- 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
793
790
-- If both players are joined, We want to unjoin the player that pressed back.
794
791
GAMESTATE :UnjoinPlayer (self .pn )
795
- Joined [self .pn ] = false
796
792
else
797
793
-- Go to the previous screen.
798
794
SCREENMAN :GetTopScreen ():SetNextScreenName (SCREENMAN :GetTopScreen ():GetPrevScreenName ()):StartTransitioningScreen (" SM_GoToNextScreen" )
@@ -811,7 +807,7 @@ return function(Style)
811
807
SCREENMAN :GetTopScreen ():SetNextScreenName (" ScreenPlayerOptions" ):StartTransitioningScreen (" SM_GoToNextScreen" )
812
808
end
813
809
-- Check if player is joined.
814
- if Joined [ self .pn ] then
810
+ if GAMESTATE : IsSideJoined ( self .pn ) then
815
811
816
812
-- We use PlayMode_Regular for now.
817
813
GAMESTATE :SetCurrentPlayMode (" PlayMode_Regular" )
@@ -820,7 +816,7 @@ return function(Style)
820
816
GAMESTATE :SetCurrentSong (GroupsAndSongs [CurSong ][1 ])
821
817
822
818
-- 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
824
820
825
821
-- If they are, We will use Versus.
826
822
GAMESTATE :SetCurrentStyle (' versus' )
@@ -857,7 +853,7 @@ return function(Style)
857
853
if UnlockedInput then
858
854
859
855
-- Check if player is joined.
860
- if Joined [ self .pn ] then
856
+ if GAMESTATE : IsSideJoined ( self .pn ) then
861
857
862
858
-- Check if we are on a group.
863
859
if type (GroupsAndSongs [CurSong ]) == " string" then
@@ -900,9 +896,6 @@ return function(Style)
900
896
901
897
-- Load the profles.
902
898
GAMESTATE :LoadProfiles ()
903
-
904
- -- Add to joined list.
905
- Joined [self .pn ] = true
906
899
end
907
900
end
908
901
end
@@ -921,8 +914,8 @@ return function(Style)
921
914
DiffSelection = true
922
915
923
916
-- 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
926
919
end ,
927
920
928
921
Slider , -- Load the sliders
0 commit comments