From 3fbc5994b1e53a94a867361ceeb0c4e84c65aea4 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Fri, 20 Sep 2013 19:54:25 +0200 Subject: [PATCH] Remove unnecessary golden property --- Vocaluxe/Base/CDataBase.cs | 2 +- Vocaluxe/Base/CGame.cs | 8 ++++---- VocaluxeLib/Songs/CSungNote.cs | 4 +--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Vocaluxe/Base/CDataBase.cs b/Vocaluxe/Base/CDataBase.cs index 5d1b6aba..b755a95b 100644 --- a/Vocaluxe/Base/CDataBase.cs +++ b/Vocaluxe/Base/CDataBase.cs @@ -951,7 +951,7 @@ namespace Vocaluxe.Base { reader = command.ExecuteReader(); } - catch (Exception e) + catch (Exception) { return false; } diff --git a/Vocaluxe/Base/CGame.cs b/Vocaluxe/Base/CGame.cs index 25ebc441..dced2fa5 100644 --- a/Vocaluxe/Base/CGame.cs +++ b/Vocaluxe/Base/CGame.cs @@ -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); diff --git a/VocaluxeLib/Songs/CSungNote.cs b/VocaluxeLib/Songs/CSungNote.cs index bfabd239..b84bfe05 100644 --- a/VocaluxeLib/Songs/CSungNote.cs +++ b/VocaluxeLib/Songs/CSungNote.cs @@ -41,16 +41,14 @@ namespace VocaluxeLib.Songs /// /// /// - 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 {