aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-15 18:13:59 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-07-15 18:13:59 +0000
commit2fb094bfc98a1c761641229acda7b6df561a8247 (patch)
treebb867e52408e4051e3c804d1bc48b3850d41253d /Game/Code/Screens
parent776361f0444627266a8fd398024c28b5bb10ae36 (diff)
downloadusdx-2fb094bfc98a1c761641229acda7b6df561a8247.tar.gz
usdx-2fb094bfc98a1c761641229acda7b6df561a8247.tar.xz
usdx-2fb094bfc98a1c761641229acda7b6df561a8247.zip
Fixed a bug in Party playlist selection when no playlist or category is available
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0x@298 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Screens')
-rw-r--r--Game/Code/Screens/UScreenPartyOptions.pas31
1 files changed, 27 insertions, 4 deletions
diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas
index aa8681d0..49cc8c53 100644
--- a/Game/Code/Screens/UScreenPartyOptions.pas
+++ b/Game/Code/Screens/UScreenPartyOptions.pas
@@ -63,11 +63,15 @@ begin
SDLK_RETURN:
begin
+ //Don'T start when Playlist is Selected and there are no Playlists
+ If (Playlist = 2) and (Length(PlaylistMan.Playlists) = 0) then
+ Exit;
+
//Save Difficulty
Ini.Difficulty := SelectsS[SelectLevel].SelectedOption;
Ini.SaveLevel;
- //Save PlayList
- //(Todo)
+
+
//Save Num Teams:
PartySession.Teams.NumTeams := NumTeams + 2;
PartySession.Teams.Teaminfo[0].NumPlayers := NumPlayer1+1;
@@ -76,6 +80,7 @@ begin
//Save Playlist
PlaylistMan.Mode := Playlist;
+ PlaylistMan.CurPlayList := High(Cardinal);
//If Category Selected Search Category ID
if Playlist = 1 then
begin
@@ -91,6 +96,10 @@ begin
Break;
end;
end;
+
+ //No Categorys or Invalid Entry
+ If PlaylistMan.CurPlayList = High(Cardinal) then
+ Exit;
end
else
PlaylistMan.CurPlayList := Playlist2;
@@ -203,11 +212,25 @@ begin
IPlaylist2[high(IPlaylist2)] := CatSongs.Song[I].Artist;
end;
end;
+
+ If (Length(IPlaylist2) = 0) then
+ begin
+ SetLength(IPlaylist2, 1);
+ IPlaylist2[0] := 'No Categories found';
+ end;
end;
2:
begin
- SetLength(IPlaylist2, Length(PlaylistMan.Playlists));
- PlaylistMan.GetNames(IPlaylist2);
+ if (Length(PlaylistMan.Playlists) > 0) then
+ begin
+ SetLength(IPlaylist2, Length(PlaylistMan.Playlists));
+ PlaylistMan.GetNames(IPlaylist2);
+ end
+ else
+ begin
+ SetLength(IPlaylist2, 1);
+ IPlaylist2[0] := 'No Playlists found';
+ end;
end;
end;