From 38ca91b7c307c4d87eaf2f4b73e5426567262216 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/branches/1.0.1@633 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Screens/UScreenPartyOptions.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Game') diff --git a/Game/Code/Screens/UScreenPartyOptions.pas b/Game/Code/Screens/UScreenPartyOptions.pas index 91611d34..06e95214 100644 --- a/Game/Code/Screens/UScreenPartyOptions.pas +++ b/Game/Code/Screens/UScreenPartyOptions.pas @@ -45,6 +45,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 @@ -67,7 +68,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