From d5cbbd6e1fa5934a79f9bdd63dca5778d5d177e0 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Tue, 24 Apr 2007 15:30:25 +0000 Subject: Fixed a Bug in PartyMode that causes that Players are not chossen fair git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@136 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UParty.pas | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Classes/UParty.pas b/Game/Code/Classes/UParty.pas index 946aca77..b07ad5ad 100644 --- a/Game/Code/Classes/UParty.pas +++ b/Game/Code/Classes/UParty.pas @@ -55,7 +55,7 @@ var end; TeamMode: Boolean; Len: Integer; - I: Integer; + I, J: Integer; function GetRandomPlugin: Byte; var @@ -107,7 +107,7 @@ begin PlayersPlay := Teams.NumTeams; - //Get Teammode and Set Joker + //Get Teammode and Set Joker, also set TimesPlayed TeamMode := True; For I := 0 to Teams.NumTeams-1 do begin @@ -115,6 +115,11 @@ begin begin TeamMode := False; end; + //Set Player Attributes + For J := 0 to Teams.TeamInfo[I].NumPlayers-1 do + begin + Teams.TeamInfo[I].Playerinfo[J].TimesPlayed := 0; + end; Teams.Teaminfo[I].Joker := Round(NumRounds*0.7); Teams.Teaminfo[I].Score := 0; end; @@ -156,6 +161,7 @@ var begin LowestTP := high(Byte); NumPwithLTP := 0; + Result := 0; //Search for Players that have not often played yet For I := 0 to Teams.Teaminfo[Team].NumPlayers-1 do @@ -323,7 +329,7 @@ begin //Increase TimesPlayed 4 all Players For I := 0 to Teams.NumTeams-1 do - Inc(Teams.Teaminfo[I].Playerinfo[Teams.Teaminfo[0].CurPlayer].TimesPlayed); + Inc(Teams.Teaminfo[I].Playerinfo[Teams.Teaminfo[I].CurPlayer].TimesPlayed); end; -- cgit v1.2.3