Skip to content

Commit 39a0467

Browse files
committed
e
1 parent 93405d6 commit 39a0467

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

source/backend/MusicBeatState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class MusicBeatState extends FlxState
315315
"PlayState" => function(state:FlxState) {
316316
if (state is PlayState) {
317317
@:privateAccess
318-
(cast state:PlayState).generateSong();
318+
(cast state:PlayState).preGenerateNotes();
319319
}
320320
},
321321
"FreeplayState" => function(state:FlxState) {

source/psychlua/FunkinLua.hx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,17 +225,20 @@ class FunkinLua {
225225
set('mania', PlayState.mania);
226226
set('trueMania', Note.ammo[PlayState.mania]);
227227

228-
function addProtectedCallback(lua:State, name:String, func:Dynamic) {
229-
Lua_helper.add_callback(lua, name, function(...args:Array<Dynamic>) {
230-
try {
231-
func.apply(this, args);
232-
}
233-
catch (e:Dynamic) {
234-
luaTrace('Error in Lua callback "' + name + '": ' + e, false, false, FlxColor.RED);
235-
}
236-
});
237-
}
238-
228+
// function addProtectedCallback(lua:State, name:String, func:Dynamic) {
229+
// Lua_helper.add_callback(lua, name, function() {
230+
// try {
231+
// var args:Array<Dynamic> = [];
232+
// for (i in 1...Lua.gettop(lua) + 1) {
233+
// args.push(Convert.fromLua(lua, i));
234+
// }
235+
// func.apply(null, args);
236+
// }
237+
// catch (e:Dynamic) {
238+
// luaTrace('Error in Lua callback "' + name + '": ' + e, false, false, FlxColor.RED);
239+
// }
240+
// });
241+
// }
239242

240243
//Fun cursor things for lua
241244
Lua_helper.add_callback(lua, "getCursorMode", function()

source/states/PlayState.hx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,11 +2426,15 @@ class PlayState extends MusicBeatState
24262426

24272427

24282428

2429+
2430+
24292431
notes = new FlxTypedGroup<Note>();
24302432
noteGroup.add(notes);
24312433

24322434

24332435

2436+
2437+
24342438
try
24352439
{
24362440
var eventsChart:SwagSong = Song.getChart('events', songName);

source/states/freeplay/FreeplayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class FreeplayState extends MusicBeatState
311311

312312
trace(hh);
313313

314-
FreeplayManager.reloadFreeplay(false);
314+
FreeplayManager.reloadFreeplay(true);
315315
changeSelection();
316316

317317
if (APEntryState.apGame != null && APEntryState.apGame.info() != null) {

0 commit comments

Comments
 (0)