From bd869ae129f42fbe2489f1f9ecf333af4dd7195a Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Fri, 26 Oct 2007 16:42:48 +0000 Subject: Fixed Score Bug in Brunch It was caused by display class calling OnShow event 2 times Some CleanUp in UScreenTop5 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.01@530 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Menu/UDisplay.pas | 4 ++-- Game/Code/Screens/UScreenTop5.pas | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Menu/UDisplay.pas b/Game/Code/Menu/UDisplay.pas index 70e678fb..29450c1d 100644 --- a/Game/Code/Menu/UDisplay.pas +++ b/Game/Code/Menu/UDisplay.pas @@ -203,7 +203,7 @@ begin end; glViewPort((S-1) * ScreenW div Screens, 0, ScreenW div Screens, ScreenH); // blackscreen-hack - if not BlackScreen then + if (not BlackScreen) AND (S = 1) then NextScreen.onShow; lastTime:=GetTickCount; if (S=2) or (Screens = 1) then @@ -252,7 +252,7 @@ begin end else // blackscreen hack - if not BlackScreen then + if (not BlackScreen) AND (S = 1) then NextScreen.OnShow; diff --git a/Game/Code/Screens/UScreenTop5.pas b/Game/Code/Screens/UScreenTop5.pas index 4d542bf0..57c61aa7 100644 --- a/Game/Code/Screens/UScreenTop5.pas +++ b/Game/Code/Screens/UScreenTop5.pas @@ -83,12 +83,10 @@ var begin Fadeout := false; - //ReadScore(AktSong); + PMax := PlayersPlay - 1; - PMax := Ini.Players; - if Ini.Players = 4 then Ini.Players := 5; for I := 0 to PMax do - DataBase.AddScore(AktSong, Ini.Difficulty, Ini.Name[I], Round(Player[I].ScoreTotalI)); + DataBase.AddScore(AktSong, Ini.Difficulty, Ini.Name[I], Player[I].ScoreTotalI); DataBase.WriteScore(AktSong); DataBase.ReadScore(AktSong); -- cgit v1.2.3