Remove unnecessary golden property
This commit is contained in:
1 parent
148aa0072d
commit
3fbc5994b1
3 files changed
+6
-8
No files matched your search
@@ -951,7 +951,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
reader = command.ExecuteReader();
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace Vocaluxe.Base
|
||||
CSungNote lastNote = Players[p].SungLines[line].LastNote;
|
||||
|
||||
if (notes[note].StartBeat == beat || lastNote.EndBeat + 1 != beat || lastNote.Tone != tone || !lastNote.Hit)
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note], points, notes[note].NoteType == ENoteType.Golden));
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note], points));
|
||||
else
|
||||
{
|
||||
Players[p].SungLines[line].IncLastNoteLength();
|
||||
@@ -309,7 +309,7 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
}
|
||||
else
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note], points, notes[note].NoteType == ENoteType.Golden));
|
||||
Players[p].SungLines[line].AddNote(new CSungNote(beat, 1, tone, notes[note], points));
|
||||
|
||||
Players[p].SungLines[line].LastNote.CheckPerfect();
|
||||
Players[p].SungLines[line].IsPerfect(lines[line]);
|
||||
@@ -384,7 +384,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
if (note.StartBeat < nextStart)
|
||||
{
|
||||
if (note.GoldenNote)
|
||||
if (note.Hit && note.HitNote.NoteType==ENoteType.Golden)
|
||||
Players[p].PointsGoldenNotes += note.Points;
|
||||
Players[p].Points += note.Points;
|
||||
}
|
||||
@@ -394,7 +394,7 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
while (line.NoteCount > n && n >= 0)
|
||||
{
|
||||
if (line.Notes[n].GoldenNote)
|
||||
if (line.Notes[n].Hit && line.Notes[n].HitNote.NoteType == ENoteType.Golden)
|
||||
Players[p].PointsGoldenNotes -= line.Notes[n].Points;
|
||||
Players[p].Points -= line.Notes[n].Points;
|
||||
line.DeleteNote(n);
|
||||
|
||||
@@ -41,16 +41,14 @@ namespace VocaluxeLib.Songs
|
||||
/// <param name="duration"></param>
|
||||
/// <param name="tone"></param>
|
||||
/// <param name="hitNote"></param>
|
||||
public CSungNote(int startBeat, int duration, int tone, CSongNote hitNote, double points, bool golden) : this(startBeat, duration, tone)
|
||||
public CSungNote(int startBeat, int duration, int tone, CSongNote hitNote, double points) : this(startBeat, duration, tone)
|
||||
{
|
||||
HitNote = hitNote;
|
||||
Points = points;
|
||||
GoldenNote = golden;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public double Points;
|
||||
public bool GoldenNote;
|
||||
// for drawing player notes
|
||||
public bool Hit
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user