Fix already sung points calculation
This commit is contained in:
1 parent
370964ee99
commit
63ef16b0a7
1 file changed
+12
-10
+12
-10
@@ -242,6 +242,16 @@ namespace Vocaluxe.Base
|
|||||||
if (line < 0 || lines[line].EndBeat < beat)
|
if (line < 0 || lines[line].EndBeat < beat)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
//Check for already sung
|
||||||
|
if (line < Players[p].SungLines.Count - 1)
|
||||||
|
continue; // Already sung whole line
|
||||||
|
if (line == Players[p].SungLines.Count - 1)
|
||||||
|
{
|
||||||
|
//We are in the last line
|
||||||
|
if (beat <= Players[p].SungLines[line].LastNoteBeat)
|
||||||
|
continue; //We already have something that ends with/after that beat
|
||||||
|
}
|
||||||
|
|
||||||
if (line != Players[p].CurrentLine)
|
if (line != Players[p].CurrentLine)
|
||||||
Players[p].CurrentNote = -1;
|
Players[p].CurrentNote = -1;
|
||||||
|
|
||||||
@@ -273,16 +283,8 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
Players[p].NoteDiff = Math.Abs(tone - tonePlayer);
|
Players[p].NoteDiff = Math.Abs(tone - tonePlayer);
|
||||||
bool hit = Players[p].NoteDiff <= (2 - (int)CProfiles.GetDifficulty(Players[p].ProfileID));
|
bool hit = Players[p].NoteDiff <= (2 - (int)CProfiles.GetDifficulty(Players[p].ProfileID));
|
||||||
bool alreadySung = false;
|
|
||||||
if (Players[p].SungLines.Count - 1 == line)
|
|
||||||
{
|
|
||||||
if (note < Players[p].SungLines[line].NoteCount)
|
|
||||||
alreadySung = true;
|
|
||||||
}
|
|
||||||
else if (Players[p].SungLines.Count - 1 > line)
|
|
||||||
alreadySung = true;
|
|
||||||
|
|
||||||
if (hit && !alreadySung)
|
if (hit)
|
||||||
{
|
{
|
||||||
// valid
|
// valid
|
||||||
//CSound.RecordSetTone(p, Tone);
|
//CSound.RecordSetTone(p, Tone);
|
||||||
@@ -312,7 +314,7 @@ namespace Vocaluxe.Base
|
|||||||
Players[p].SungLines[line].LastNote.CheckPerfect();
|
Players[p].SungLines[line].LastNote.CheckPerfect();
|
||||||
Players[p].SungLines[line].IsPerfect(lines[line]);
|
Players[p].SungLines[line].IsPerfect(lines[line]);
|
||||||
}
|
}
|
||||||
else //if(!alreadySung)
|
else
|
||||||
{
|
{
|
||||||
if (Players[p].SungLines[line].NoteCount > 0)
|
if (Players[p].SungLines[line].NoteCount > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user