diff options
author | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-07-18 10:33:05 +0000 |
---|---|---|
committer | whiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2010-07-18 10:33:05 +0000 |
commit | 1e38a5b1aeaef43c4807113251705a5cc1099ae7 (patch) | |
tree | 50f9cbc026a64e2da12280548772712a02ca8869 | |
parent | bb2e9ebb3a24beb1c486f608d0046658d991bb6f (diff) | |
download | usdx-1e38a5b1aeaef43c4807113251705a5cc1099ae7.tar.gz usdx-1e38a5b1aeaef43c4807113251705a5cc1099ae7.tar.xz usdx-1e38a5b1aeaef43c4807113251705a5cc1099ae7.zip |
fix party player selection
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2581 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r-- | src/base/UParty.pas | 16 |
1 files changed, 15 insertions, 1 deletions
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; |