diff options
Diffstat (limited to 'Game/Code/Classes/USingScores.pas')
-rw-r--r-- | Game/Code/Classes/USingScores.pas | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/Game/Code/Classes/USingScores.pas b/Game/Code/Classes/USingScores.pas index 052ff678..88b278b7 100644 --- a/Game/Code/Classes/USingScores.pas +++ b/Game/Code/Classes/USingScores.pas @@ -414,15 +414,46 @@ end; // Removes a PopUp w/o destroying the List
//-----------
Procedure TSingScores.KillPopUp(const last, cur: PScorePopUp);
+var
+ lTempA ,
+ lTempB : real;
begin
//Give Player the Last Points that missing till now
aPlayers[Cur.Player].ScoreDisplayed := aPlayers[Cur.Player].ScoreDisplayed + Cur.ScoreDiff - Cur.ScoreGiven;
//Change Bars Position
- aPlayers[Cur.Player].RBTarget := aPlayers[Cur.Player].RBTarget + (Cur.ScoreDiff - Cur.ScoreGiven)/Cur.ScoreDiff * (Cur.Rating / 20 - 0.26);
+
+ // TODO : JB_Lazarus - Exception=Invalid floating point operation
+ // AT THIS LINE !
+
+ writeln( 'USINGSCORES-aPlayers[Cur.Player].RBTarget : ' + floattostr( aPlayers[Cur.Player].RBTarget ) );
+ writeln( 'USINGSCORES-(Cur.ScoreDiff - Cur.ScoreGiven) : ' + floattostr( (Cur.ScoreDiff - Cur.ScoreGiven) ) );
+ writeln( 'USINGSCORES-Cur.ScoreDiff : ' + floattostr( Cur.ScoreDiff ) );
+ writeln( 'USINGSCORES-(Cur.Rating / 20 - 0.26) : ' + floattostr( (Cur.Rating / 20 - 0.26) ) );
+ writeln( '' );
+
+ lTempA := ( aPlayers[Cur.Player].RBTarget + (Cur.ScoreDiff - Cur.ScoreGiven) );
+ lTempB := ( Cur.ScoreDiff * (Cur.Rating / 20 - 0.26) );
+
+ writeln( 'USINGSCORES-lTempA : ' + floattostr( lTempA ) );
+ writeln( 'USINGSCORES-lTempB : ' + floattostr( lTempB ) );
+ writeln( '----------------------------------------------------------' );
+
+
+ if ( lTempA > 0 ) AND
+ ( lTempB > 0 ) THEN
+ begin
+ writeln( 'USINGSCORES-lTempA / lTempB :' + floattostr( lTempA / lTempB ) );
+ aPlayers[Cur.Player].RBTarget := lTempA / lTempB;
+ end;
+
+ writeln( '----------------------------------------------------------' );
+ writeln( '' );
+
If (aPlayers[Cur.Player].RBTarget > 1) then
aPlayers[Cur.Player].RBTarget := 1
- else If (aPlayers[Cur.Player].RBTarget < 0) then
+ else
+ If (aPlayers[Cur.Player].RBTarget < 0) then
aPlayers[Cur.Player].RBTarget := 0;
//If this is the First PopUp => Make Next PopUp the First
|