aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-24 15:30:25 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-04-24 15:30:25 +0000
commitd5cbbd6e1fa5934a79f9bdd63dca5778d5d177e0 (patch)
treee5ff5110b000df070bfb02952db61e56bad24146 /Game/Code
parent665cc80df49badf73b9db86733dec1773a8a8861 (diff)
downloadusdx-d5cbbd6e1fa5934a79f9bdd63dca5778d5d177e0.tar.gz
usdx-d5cbbd6e1fa5934a79f9bdd63dca5778d5d177e0.tar.xz
usdx-d5cbbd6e1fa5934a79f9bdd63dca5778d5d177e0.zip
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
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UParty.pas12
1 files changed, 9 insertions, 3 deletions
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;