aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-15 11:05:10 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-15 11:05:10 +0000
commitfae5839e8025f020638b4cd0583a9a992c5a7a1e (patch)
tree23575cd865f33ed66dba502489e2311b075d221d /Game
parentb271750f0ba7b1174d26f8164bc8f9f46766c5e3 (diff)
downloadusdx-fae5839e8025f020638b4cd0583a9a992c5a7a1e.tar.gz
usdx-fae5839e8025f020638b4cd0583a9a992c5a7a1e.tar.xz
usdx-fae5839e8025f020638b4cd0583a9a992c5a7a1e.zip
Fixed some Bugs in Party Mode
Fixed Support CategoryOnly Playlist Support git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@93 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UParty.pas13
-rw-r--r--Game/Code/Screens/UScreenMain.pas2
-rw-r--r--Game/Code/Screens/UScreenPartyNewRound.pas4
-rw-r--r--Game/Code/Screens/UScreenPartyPlayer.pas2
-rw-r--r--Game/Code/Screens/UScreenPartyScore.pas8
-rw-r--r--Game/Code/Screens/UScreenSong.pas4
6 files changed, 18 insertions, 15 deletions
diff --git a/Game/Code/Classes/UParty.pas b/Game/Code/Classes/UParty.pas
index f5834dd8..e5252f82 100644
--- a/Game/Code/Classes/UParty.pas
+++ b/Game/Code/Classes/UParty.pas
@@ -107,13 +107,16 @@ begin
PlayersPlay := Teams.NumTeams;
+ //Get Teammode and Set Joker
TeamMode := True;
For I := 0 to Teams.NumTeams-1 do
+ begin
if Teams.Teaminfo[I].NumPlayers < 2 then
begin
TeamMode := False;
- Break;
end;
+ Teams.Teaminfo[I].Joker := Round(NumRounds*0.7);
+ end;
//Fill Plugin Array
SetLength(Plugins, 0);
@@ -186,7 +189,7 @@ begin
//Increase Current Round
Inc (CurRound);
- Rounds[CurRound].Winner := 0;
+ Rounds[CurRound].Winner := 255;
DllMan.LoadPlugin(Rounds[CurRound].Plugin);
//Select Players
@@ -241,9 +244,13 @@ var
Winners: Array of String;
I: Integer;
begin
+ Result := Language.Translate('PARTY_NOBODY');
+
+ if (Round > High(Rounds)) then
+ exit;
+
if (Rounds[Round].Winner = 0) then
begin
- Result := Language.Translate('PARTY_NOBODY');
exit;
end;
diff --git a/Game/Code/Screens/UScreenMain.pas b/Game/Code/Screens/UScreenMain.pas
index 90a6310d..dd7f21c5 100644
--- a/Game/Code/Screens/UScreenMain.pas
+++ b/Game/Code/Screens/UScreenMain.pas
@@ -128,7 +128,7 @@ begin
end;
SDLK_M:
begin
- if (Ini.Players >= 2) AND (Length(DLLMan.Plugins)>=1) then
+ if (Ini.Players >= 1) AND (Length(DLLMan.Plugins)>=1) then
begin
Music.PlayStart;
FadeTo(@ScreenPartyOptions);
diff --git a/Game/Code/Screens/UScreenPartyNewRound.pas b/Game/Code/Screens/UScreenPartyNewRound.pas
index 1e9be1f5..c8c0febc 100644
--- a/Game/Code/Screens/UScreenPartyNewRound.pas
+++ b/Game/Code/Screens/UScreenPartyNewRound.pas
@@ -176,10 +176,6 @@ procedure TScreenPartyNewRound.onShow;
var
I: Integer;
begin
- //If not First Round, End Last Round
- if (PartySession.CurRound <> 255) then
- PartySession.EndRound;
-
PartySession.StartRound;
Log.LogError(InttoStr(Length(DllMan.Plugins)));
diff --git a/Game/Code/Screens/UScreenPartyPlayer.pas b/Game/Code/Screens/UScreenPartyPlayer.pas
index 498514fb..02f87710 100644
--- a/Game/Code/Screens/UScreenPartyPlayer.pas
+++ b/Game/Code/Screens/UScreenPartyPlayer.pas
@@ -76,6 +76,7 @@ begin
SDLK_RETURN:
begin
+ //Save PlayerNames
for I := 0 to PartySession.Teams.NumTeams-1 do
begin
PartySession.Teams.Teaminfo[I].Name := PChar(Button[I*5].Text[0].Text);
@@ -84,7 +85,6 @@ begin
PartySession.Teams.Teaminfo[I].Playerinfo[J].Name := PChar(Button[I*5 + J+1].Text[0].Text);
PartySession.Teams.Teaminfo[I].Playerinfo[J].TimesPlayed := 0;
end;
- PartySession.Teams.Teaminfo[I].Joker := Round (Length(PartySession.Rounds) * 0.85);
end;
Music.PlayStart;
diff --git a/Game/Code/Screens/UScreenPartyScore.pas b/Game/Code/Screens/UScreenPartyScore.pas
index 9cbeb5d5..142ec947 100644
--- a/Game/Code/Screens/UScreenPartyScore.pas
+++ b/Game/Code/Screens/UScreenPartyScore.pas
@@ -57,13 +57,10 @@ begin
SDLK_RETURN:
begin
Music.PlayStart;
- if (PartySession.CurRound <= High(PartySession.Rounds)) then
+ if (PartySession.CurRound < High(PartySession.Rounds)) then
FadeTo(@ScreenPartyNewRound)
else
- begin
- PartySession.EndRound;
FadeTo(@ScreenPartyWin);
- end;
end;
end;
end;
@@ -114,6 +111,9 @@ begin
Static[StaticTeam2].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[1].Percentage / 100;
Static[StaticTeam3].Texture.ScaleW := ScreenSingModi.PlayerInfo.Playerinfo[2].Percentage / 100;
+ //End Last Round
+ PartySession.EndRound;
+
//Set Winnertext
Text[TextWinner].Text := Format(Language.Translate('PARTY_SCORE_WINS'), [PartySession.GetWinnerString(PartySession.CurRound)]);
diff --git a/Game/Code/Screens/UScreenSong.pas b/Game/Code/Screens/UScreenSong.pas
index 7ea5d268..7c8447ee 100644
--- a/Game/Code/Screens/UScreenSong.pas
+++ b/Game/Code/Screens/UScreenSong.pas
@@ -1488,8 +1488,8 @@ begin
end;
1: //One Category Select Category and Select Random Song
begin
- CatSongs.HideCategory(-1);
- CatSongs.ShowCategory(PlaylistMan.CurPlayList);
+ CatSongs.ShowCategoryList;
+ CatSongs.ClickCategoryButton(PlaylistMan.CurPlayList);
ShowCatTL(PlaylistMan.CurPlayList);
SelectNext;