From 96bad07609c8f0036dc482a74797deabeac46d33 Mon Sep 17 00:00:00 2001 From: jekatt Date: Fri, 23 Nov 2007 14:30:13 +0000 Subject: 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 --- Game/Code/Screens/UScreenPartyOptions.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Game/Code') 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; -- cgit v1.2.3