Skip to content

Commit

Permalink
change some note sustain assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Vortex2Oblivion committed Dec 8, 2024
1 parent e651b75 commit 3b7908c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 35 deletions.
Binary file modified assets/shared/images/ui skins/default/arrows/caution.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/shared/images/ui skins/default/arrows/death.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/shared/images/ui skins/default/arrows/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/shared/images/ui skins/default/arrows/hurt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 25 additions & 34 deletions source/game/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ class Note extends FlxSkewedSprite {
if (prevNote.animation != null)
prevNote.animation.play("hold");


prevNote.scale.y *= Conductor.stepCrochet / 100 * 1.5 * speed;
prevNote.updateHitbox();
prevNote.sustainScaleY = prevNote.scale.y;
Expand Down Expand Up @@ -290,39 +289,31 @@ class Note extends FlxSkewedSprite {
}

public function calculateCanBeHit() {
if (this != null) {
if (mustPress) {
/**
// TODO: make this shit use something from the arrow config .txt file
**/
if (shouldHit) {
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset)
canBeHit = true;
else
canBeHit = false;
} else {
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset * 0.3
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset * 0.2)
canBeHit = true;
else
canBeHit = false;
}

if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
tooLate = true;
if (this == null) {
return;
}
if (mustPress) {
/**
// TODO: make this shit use something from the arrow config .txt file
**/
if (shouldHit) {
canBeHit = (strumTime > Conductor.songPosition - Conductor.safeZoneOffset
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset);
} else {
canBeHit = false;
canBeHit = (strumTime > Conductor.songPosition - Conductor.safeZoneOffset / 3
&& strumTime < Conductor.songPosition + Conductor.safeZoneOffset * 0.2);
}

if (!isSustainNote) {
if (strumTime <= Conductor.songPosition)
canBeHit = true;
} else {
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset * 0.3)
canBeHit = true;
else
canBeHit = false;
}
if (strumTime < Conductor.songPosition - Conductor.safeZoneOffset && !wasGoodHit)
tooLate = true;
} else {
canBeHit = false;

if (!isSustainNote) {
if (strumTime <= Conductor.songPosition)
canBeHit = true;
} else {
canBeHit = (strumTime < Conductor.songPosition - Conductor.safeZoneOffset / 3);
}
}
}
Expand All @@ -339,10 +330,10 @@ class Note extends FlxSkewedSprite {
}

@:noCompletion function set_speed(speed:Float):Float {
if(Options.getData("useCustomScrollSpeed")){
if (Options.getData("useCustomScrollSpeed")) {
speed = Options.getData("customScrollSpeed") / PlayState.songMultiplier;
}
if(isSustainNote && !inEditor && animation != null && !animation?.curAnim?.name?.endsWith('end')){
if (isSustainNote && !inEditor && animation != null && !animation?.curAnim?.name?.endsWith('end')) {
scale.y = Std.parseFloat(PlayState.instance.ui_settings[0]) * (Std.parseFloat(PlayState.instance.ui_settings[2])
- (Std.parseFloat(PlayState.instance.mania_size[3])));
scale.y *= Conductor.stepCrochet / 100 * 1.5 * speed;
Expand Down
2 changes: 1 addition & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@ class PlayState extends MusicBeatState {
for (susNote in 0...Math.floor(swagNote.sustainLength / Std.int(Conductor.stepCrochet))) {
oldNote = unspawnNotes[unspawnNotes.length - 1];

var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + (Conductor.stepCrochet / (Options.getData("downscroll") ? 1 :FlxMath.roundDecimal(speed,
var sustainNote:Note = new Note(daStrumTime + (Conductor.stepCrochet * susNote) + (Conductor.stepCrochet / (Options.getData("downscroll") ? 1 : FlxMath.roundDecimal(speed,
2))), noteData, oldNote, true,
char, songNotes[4], null, chars, gottaHitNote);
sustainNote.scrollFactor.set();
Expand Down

0 comments on commit 3b7908c

Please sign in to comment.