From 2266583f00665b4e618ca608d1b98d13e9f68205 Mon Sep 17 00:00:00 2001 From: brunzelchen Date: Wed, 20 Apr 2011 16:22:47 +0000 Subject: fixed calculation of points in "sing together mode" git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2827 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UMain.pas | 17 +++++++++-------- Game/Code/Screens/UScreenSing.pas | 23 ++++++++++++++--------- Game/Code/UltraStar.dpr | 2 +- Installer/settings/variables.nsh | 2 +- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas index 347f92bc..84cfd35f 100644 --- a/Game/Code/Classes/UMain.pas +++ b/Game/Code/Classes/UMain.pas @@ -536,7 +536,7 @@ end; procedure NewNote(P: integer; Sender: TScreenSing); const - DEBUG_NOTE_HIT = false; + DEBUG_NOTE_HIT = true; var CP: integer; // current player @@ -666,13 +666,7 @@ begin MeanPlayer.ScoreTotalI := MeanPlayer.ScoreI + MeanPlayer.ScoreGoldenI + MeanPlayer.ScoreLineI; - if ScreenSong.SingTogether then - begin - Player[CP].ScoreI := MeanPlayer.ScoreI; - Player[CP].ScoreGoldenI := MeanPlayer.ScoreGoldenI; - - Player[CP].ScoreTotalI := MeanPlayer.ScoreTotalI; - end else + if not ScreenSong.SingTogether then begin Player[CP].ScoreI := Floor(Player[CP].Score / 10) * 10; Player[CP].ScoreGoldenI := Floor(Player[CP].ScoreGolden / 10) * 10; @@ -769,6 +763,13 @@ begin Player[CP].ScoreMax := Player[CP].ScoreTotalI + Player[CP].ScoreMax; + if ScreenSong.SingTogether then + begin + Player[CP].ScoreI := MeanPlayer.ScoreI; + Player[CP].ScoreGoldenI := MeanPlayer.ScoreGoldenI; + + Player[CP].ScoreTotalI := MeanPlayer.ScoreTotalI; + end; end else begin //############################ DUET ##################### if (CP mod 2 = P) then diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index a7bcdc75..8d29b9e4 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -2481,11 +2481,11 @@ begin else B := 10000; - for I := 0 to High(Player) do + for I := 0 to PlayersPlay-1 do begin if not AktSong.isDuet or (I mod 2 = CP) then begin - + A := Player[I].Score + Player[I].ScoreGolden - Player[I].ScoreLast + 2; //SingBar Mod @@ -2518,19 +2518,14 @@ begin (1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8); MeanPlayer.ScoreLine := MeanPlayer.ScoreLine + - (1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8); + (1000 / (Length(Czesci[CP].Czesc) - NumEmptySentences[CP]) * A / 8) / PlayersPlay; end; MeanPlayer.ScoreLineI := Round(MeanPlayer.ScoreLine / 10) * 10; //Update Total Score MeanPlayer.ScoreTotalI := MeanPlayer.ScoreI + MeanPlayer.ScoreGoldenI + MeanPlayer.ScoreLineI; - if ScreenSong.SingTogether then - begin - Player[I].ScoreLineI := MeanPlayer.ScoreLineI; - //Update Total Score - Player[I].ScoreTotalI := MeanPlayer.ScoreTotalI; - end else + if not ScreenSong.SingTogether then begin Player[I].ScoreLineI := Round(Player[I].ScoreLine / 10) * 10; //Update Total Score @@ -2595,6 +2590,16 @@ begin end; end; + if ScreenSong.SingTogether then + begin + for I := 0 to PlayersPlay - 1 do + begin + Player[I].ScoreLineI := MeanPlayer.ScoreLineI; + //Update Total Score + Player[I].ScoreTotalI := MeanPlayer.ScoreTotalI; + end; + end; + //PerfectLineTwinkle Mod (effect) Pt.2 if Ini.EffectSing=1 then GoldenRec.SpawnPerfectLineTwinkle; diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr index 65b57829..1774e948 100644 --- a/Game/Code/UltraStar.dpr +++ b/Game/Code/UltraStar.dpr @@ -123,7 +123,7 @@ uses const VersionName = 'UltraStar Deluxe Challenge, Medley & Duet Edition'; - VersionNumber = 'r9.19'; + VersionNumber = 'r9.20'; var WndTitle: string; diff --git a/Installer/settings/variables.nsh b/Installer/settings/variables.nsh index c9cbf87e..d03e1b7d 100644 --- a/Installer/settings/variables.nsh +++ b/Installer/settings/variables.nsh @@ -1,7 +1,7 @@ ; These are the common used variables ; for the USdx Challenge, Medley & Duet Edition Installation Wizard -!define version "r9.19" ; Current version of UltraStar Deluxe Challenge, Medley & Duet Edition +!define version "r9.20" ; Current version of UltraStar Deluxe Challenge, Medley & Duet Edition !define p_name "UltraStar Deluxe CMD Edition" ; Just the name of the program !define publisher "USDX Team" ; Publisher !define homepage "http://www.ultrastardeluxe.org/" ; Project Homepage -- cgit v1.2.3