aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Screens
diff options
context:
space:
mode:
authorjekatt <jekatt@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-23 14:30:13 +0000
committerjekatt <jekatt@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-23 14:30:13 +0000
commit96bad07609c8f0036dc482a74797deabeac46d33 (patch)
treea3c65f3817752b506f2308db25774c1b6caf2207 /Game/Code/Screens
parentffd5802b61992b3b6a5f891036c1717fa4de7d6b (diff)
downloadusdx-96bad07609c8f0036dc482a74797deabeac46d33.tar.gz
usdx-96bad07609c8f0036dc482a74797deabeac46d33.tar.xz
usdx-96bad07609c8f0036dc482a74797deabeac46d33.zip
Fixed: PartyModus: SinglePlayer Teams but only Multiplayer Plugins available
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@633 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Screens/UScreenPartyOptions.pas11
1 files changed, 10 insertions, 1 deletions
diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas
index 85ee65bc..46a075ce 100644
--- a/Game/Code/Screens/UScreenPartyOptions.pas
+++ b/Game/Code/Screens/UScreenPartyOptions.pas
@@ -51,6 +51,7 @@ uses UGraphic, UMain, UIni, UTexture, ULanguage, UParty, UDLLManager, UPlaylist,
function TScreenPartyOptions.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean;
var
I, J: Integer;
+ OnlyMultiPlayer: boolean;
begin
Result := true;
If (PressedDown) Then
@@ -74,7 +75,15 @@ begin
//Don'T start when Playlist is Selected and there are no Playlists
If (Playlist = 2) and (Length(PlaylistMan.Playlists) = 0) then
Exit;
-
+ // Don't start when SinglePlayer Teams but only Multiplayer Plugins available
+ OnlyMultiPlayer:=true;
+ for I := 0 to High(DLLMan.Plugins) do begin
+ OnlyMultiPlayer := (OnlyMultiPlayer AND DLLMan.Plugins[I].TeamModeOnly);
+ end;
+ if (OnlyMultiPlayer) AND ((NumPlayer1 = 0) OR (NumPlayer2 = 0) OR ((NumPlayer3 = 0) AND (NumTeams = 1))) then begin
+ ScreenPopupError.ShowPopup(Language.Translate('ERROR_NO_PLUGINS'));
+ Exit;
+ end;
//Save Difficulty
Ini.Difficulty := SelectsS[SelectLevel].SelectedOption;
Ini.SaveLevel;