Fix "scoreable = false" not working on hold notes.
This commit is contained in:
@@ -2774,9 +2774,12 @@ class PlayState extends MusicBeatSubState
|
||||
// When the opponent drops a hold note.
|
||||
holdNote.handledMiss = true;
|
||||
|
||||
// We dropped a hold note.
|
||||
// Play miss animation, but don't penalize.
|
||||
if (currentStage != null) currentStage.getOpponent().playSingAnimation(holdNote.noteData.getDirection(), true);
|
||||
if (holdNote.scoreable)
|
||||
{
|
||||
// We dropped a hold note.
|
||||
// Play miss animation, but don't penalize.
|
||||
if (currentStage != null) currentStage.getOpponent().playSingAnimation(holdNote.noteData.getDirection(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2866,7 +2869,7 @@ class PlayState extends MusicBeatSubState
|
||||
// vocals.playerVolume = 0;
|
||||
// if (currentStage != null && currentStage.getBoyfriend() != null) currentStage.getBoyfriend().playSingAnimation(holdNote.noteData.getDirection(), true);
|
||||
|
||||
if (!isBotPlayMode)
|
||||
if (!isBotPlayMode && holdNote.scoreable)
|
||||
{
|
||||
if (holdNote.sustainLength > Constants.HOLD_DROP_PENALTY_THRESHOLD_MS)
|
||||
{
|
||||
|
||||
@@ -105,9 +105,9 @@ class NoteSprite extends FunkinSprite
|
||||
public var noteData:SongNoteData;
|
||||
|
||||
/**
|
||||
* If this note kind is scoreable (i.e., counted towards score and accuracy)
|
||||
* Only accessible in scripts
|
||||
* Defaults to true
|
||||
* Set this to `false` to disable scoring for this note.
|
||||
* The note will no longer count towards ratings, points, or accuracy.
|
||||
* @default `true` to enable scoring.
|
||||
*/
|
||||
public var scoreable:Bool = true;
|
||||
|
||||
|
||||
@@ -1138,7 +1138,10 @@ class Strumline extends FlxSpriteGroup
|
||||
if (noteSprite != null)
|
||||
{
|
||||
var noteKind:NoteKind = NoteKindManager.getNoteKind(note.kind);
|
||||
var noteKindStyle:NoteStyle = NoteKindManager.getNoteStyle(note.kind, this.noteStyle.id) ?? this.noteStyle;
|
||||
var noteKindStyle:NoteStyle = NoteKindManager.getNoteStyle(note.kind, this.noteStyle.id);
|
||||
if (noteKindStyle == null) noteKindStyle = NoteKindManager.getNoteStyle(note.kind, null);
|
||||
if (noteKindStyle == null) noteKindStyle = this.noteStyle;
|
||||
|
||||
noteSprite.setupNoteGraphic(noteKindStyle);
|
||||
|
||||
var trueScale = new FlxPoint(strumlineScale.x, strumlineScale.y);
|
||||
@@ -1162,6 +1165,7 @@ class Strumline extends FlxSpriteGroup
|
||||
noteSprite.x -= (noteSprite.width - Strumline.STRUMLINE_SIZE) / 2; // Center it
|
||||
noteSprite.x -= NUDGE;
|
||||
noteSprite.y = -9999;
|
||||
|
||||
if (noteKind != null) noteSprite.scoreable = noteKind.scoreable;
|
||||
}
|
||||
|
||||
@@ -1179,6 +1183,7 @@ class Strumline extends FlxSpriteGroup
|
||||
|
||||
if (holdNoteSprite != null)
|
||||
{
|
||||
var noteKind:NoteKind = NoteKindManager.getNoteKind(note.kind);
|
||||
var noteKindStyle:NoteStyle = NoteKindManager.getNoteStyle(note.kind, this.noteStyle.id);
|
||||
if (noteKindStyle == null) noteKindStyle = NoteKindManager.getNoteStyle(note.kind, null);
|
||||
if (noteKindStyle == null) noteKindStyle = this.noteStyle;
|
||||
@@ -1201,6 +1206,8 @@ class Strumline extends FlxSpriteGroup
|
||||
holdNoteSprite.x += STRUMLINE_SIZE / 2;
|
||||
holdNoteSprite.x -= holdNoteSprite.width / 2;
|
||||
holdNoteSprite.y = -9999;
|
||||
|
||||
if (noteKind != null) holdNoteSprite.scoreable = noteKind.scoreable;
|
||||
}
|
||||
|
||||
return holdNoteSprite;
|
||||
|
||||
@@ -29,11 +29,23 @@ class SustainTrail extends FlxSprite
|
||||
public var noteDirection:NoteDirection = 0;
|
||||
public var sustainLength(default, set):Float = 0; // millis
|
||||
public var fullSustainLength:Float = 0;
|
||||
public var noteData:Null<SongNoteData>;
|
||||
public var parentStrumline:Strumline;
|
||||
|
||||
public var cover:NoteHoldCover = null;
|
||||
|
||||
/**
|
||||
* The note data associated with this hold note sprite.
|
||||
* This is used to store the strum time, length, and other properties.
|
||||
*/
|
||||
public var noteData:Null<SongNoteData>;
|
||||
|
||||
/**
|
||||
* Set this to `false` to disable scoring for this note.
|
||||
* The note will no longer count towards ratings, points, or accuracy.
|
||||
* @default `true` to enable scoring.
|
||||
*/
|
||||
public var scoreable:Bool = true;
|
||||
|
||||
/**
|
||||
* The Y Offset of the note.
|
||||
*/
|
||||
|
||||
@@ -39,9 +39,9 @@ class NoteKind implements INoteScriptedClass
|
||||
public var params:Array<NoteKindParam>;
|
||||
|
||||
/**
|
||||
* If this note kind is scoreable (ie, counted towards score and accuracy)
|
||||
* Only accessible in scripts
|
||||
* Defaults to true
|
||||
* Set this to `false` to disable scoring for this note.
|
||||
* The note will no longer count towards ratings, points, or accuracy.
|
||||
* @default `true` to enable scoring.
|
||||
*/
|
||||
public var scoreable(default, default):Bool = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user