From 1e38a5b1aeaef43c4807113251705a5cc1099ae7 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sun, 18 Jul 2010 10:33:05 +0000 Subject: fix party player selection git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2581 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UParty.pas | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/base/UParty.pas b/src/base/UParty.pas index 2f89afd6..bc485dca 100644 --- a/src/base/UParty.pas +++ b/src/base/UParty.pas @@ -174,6 +174,9 @@ type returns true on success } function SetRanking(Ranking: AParty_TeamRanking): Boolean; + { increases players TimesPlayed value } + procedure IncTimesPlayed; + { increases round counter by 1 and clears all round specific information; returns the number of the current round or -1 if last round has already been played } @@ -210,7 +213,7 @@ type { returns a string like "Team 1 (and Team 2) win" } function GetWinnerString(Round: integer): UTF8String; - destructor Destroy; + destructor Destroy; override; end; const @@ -713,6 +716,15 @@ begin SetRanking(Ranking); end; +{ increases players TimesPlayed value } +procedure TPartyGame.IncTimesPlayed; + var I: Integer; +begin + for I := 0 to High(Teams) do + with Teams[I] do + Inc(Players[NextPlayer].TimesPlayed); +end; + { increases round counter by 1 and clears all round specific information; returns the number of the current round or -1 if last round has already been played } @@ -722,6 +734,8 @@ begin // some lines concerning the previous round if (CurRound >= 0) then begin + IncTimesPlayed; + Rounds[CurRound].AlreadyPlayed := true; GenScores; -- cgit v1.2.3