Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
fixed note flickering and held notes for botplay
Browse files Browse the repository at this point in the history
  • Loading branch information
RadiantCorium committed Jun 1, 2022
1 parent c2baf27 commit fbf110f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->

<app title="Friday Night Funkin' Sharp Engine" file="Funkin" packageName="com.tpg.sharpengine" package="com.tpg.sharpengine" main="Main" version="0.1.0" company="thepercentageguy" />
<app title="Friday Night Funkin' Sharp Engine" file="Funkin" packageName="com.tpg.sharpengine" package="com.tpg.sharpengine" main="Main" version="BETA-1" company="thepercentageguy" />

<!--The flixel preloader is not accurate in Chrome. You can use it regularly if you embed the swf into a html file
or you can set the actual size of your file manually at "FlxPreloaderBase-onUpdate-bytesTotal"-->
Expand Down
14 changes: 12 additions & 2 deletions source/states/gameplay/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ class PlayState extends MusicBeatState
{
notes.forEachAlive(function(note:Note)
{
if (note.mustPress && FlxG.overlap(playerStrums, note) && note.y <= strumY)
if (note.mustPress && FlxG.overlap(playerStrums, note) && note.y <= strumY && !note.isSustainNote)
{
boyfriend.holdTimer = 0;
// if all conditions are met, then we hit the note.
Expand All @@ -2069,7 +2069,17 @@ class PlayState extends MusicBeatState
popUpScore(timing);

new FlxTimer().start(0.2, (_) -> {
playerStrums.members[note.noteData].animation.play("static");
if (!FlxG.overlap(playerStrums.members[note.noteData], notes))
playerStrums.members[note.noteData].animation.play("static");
});
}
else if (note.mustPress && FlxG.overlap(playerStrums, note) && note.isSustainNote)
{
goodNoteHit(note);

new FlxTimer().start(0.2, (_) -> {
if (!FlxG.overlap(playerStrums.members[note.noteData], notes))
playerStrums.members[note.noteData].animation.play("static");
});
}
});
Expand Down

0 comments on commit fbf110f

Please sign in to comment.