diff options
author | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 19:59:32 +0000 |
---|---|---|
committer | tobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2009-07-23 19:59:32 +0000 |
commit | 75a949c7be43f17a6311926a20adf29df92c1c25 (patch) | |
tree | 111582d86c1fdeb44aebacb549b898f5e337f381 /unicode/src/screens/UScreenSing.pas | |
parent | da7cc4abba0f3a115f8adaf79fda120db4fa19d3 (diff) | |
download | usdx-75a949c7be43f17a6311926a20adf29df92c1c25.tar.gz usdx-75a949c7be43f17a6311926a20adf29df92c1c25.tar.xz usdx-75a949c7be43f17a6311926a20adf29df92c1c25.zip |
merge with trunk revision 1845
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1900 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'unicode/src/screens/UScreenSing.pas')
-rw-r--r-- | unicode/src/screens/UScreenSing.pas | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/unicode/src/screens/UScreenSing.pas b/unicode/src/screens/UScreenSing.pas index 6b361b81..ef8289a5 100644 --- a/unicode/src/screens/UScreenSing.pas +++ b/unicode/src/screens/UScreenSing.pas @@ -905,10 +905,14 @@ begin // points for this line LineScore := CurrentScore - CurrentPlayer.ScoreLast; - // determine LinePerfection - // Note: the "+2" extra points are a little bonus so the player does not - // have to be that perfect to reach the bonus steps. - LinePerfection := (LineScore + 2) / MaxLineScore; + // check for lines with low points + if (MaxLineScore <= 2) then + LinePerfection := 1 + else + // determine LinePerfection + // Note: the "+2" extra points are a little bonus so the player does not + // have to be that perfect to reach the bonus steps. + LinePerfection := LineScore / (MaxLineScore - 2); // clamp LinePerfection to range [0..1] if (LinePerfection < 0) then |