Skip to content

Commit

Permalink
check Function_StopHScript/All on "pre" functions
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryFrosty committed Sep 16, 2024
1 parent e5f8a4f commit 46a1ac5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2815,7 +2815,7 @@ class PlayState extends MusicBeatState
});

var result:Dynamic = callOnLuas('noteMissPre', [notes.members.indexOf(daNote), daNote.noteData, daNote.noteType, daNote.isSustainNote]);
var result2:Dynamic = callOnHScript('noteMissPre', [daNote]);
var result2:Dynamic = (result != LuaUtils.Function_StopHScript && result != LuaUtils.Function_StopAll) ? callOnHScript('noteMissPre', [daNote]) : null;
if (result == LuaUtils.Function_Stop || result2 == LuaUtils.Function_Stop) return;
noteMissCommon(daNote.noteData, daNote);
stagesFunc(function(stage:BaseStage) stage.noteMiss(daNote));
Expand Down Expand Up @@ -2917,7 +2917,7 @@ class PlayState extends MusicBeatState
function opponentNoteHit(note:Note):Void
{
var result:Dynamic = callOnLuas('opponentNoteHitPre', [notes.members.indexOf(note), Math.abs(note.noteData), note.noteType, note.isSustainNote]);
var result2:Dynamic = callOnHScript('opponentNoteHitPre', [note]);
var result2:Dynamic = (result != LuaUtils.Function_StopHScript && result != LuaUtils.Function_StopAll) ? callOnHScript('opponentNoteHitPre', [note]) : null;
if (result == LuaUtils.Function_Stop || result2 == LuaUtils.Function_Stop) return;

if (songName != 'tutorial')
Expand Down Expand Up @@ -2971,7 +2971,7 @@ class PlayState extends MusicBeatState
var leType:String = note.noteType;

var result:Dynamic = callOnLuas('goodNoteHitPre', [notes.members.indexOf(note), leData, leType, isSus]);
var result2:Dynamic = callOnHScript('goodNoteHitPre', [note]);
var result2:Dynamic = (result != LuaUtils.Function_StopHScript && result != LuaUtils.Function_StopAll) ? callOnHScript('goodNoteHitPre', [note]) : null;
if (result == LuaUtils.Function_Stop || result2 == LuaUtils.Function_Stop) return;

note.wasGoodHit = true;
Expand Down

0 comments on commit 46a1ac5

Please sign in to comment.