diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 701d1fc..33cb1c4 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -1520,6 +1520,7 @@ class ChartingState extends MusicBeatState } } + var doInput = true; for (i in Typeables) diff --git a/source/ModchartState.hx b/source/ModchartState.hx index 4132c4c..311ae08 100644 --- a/source/ModchartState.hx +++ b/source/ModchartState.hx @@ -297,7 +297,12 @@ class ModchartState case 'philly-nice': songLowercase = 'philly'; } - var data:BitmapData = BitmapData.fromFile(Sys.getCwd() + "assets/data/" + songLowercase + '/' + spritePath + ".png"); + var path = Sys.getCwd() + "assets/data/" + songLowercase + '/'; + + if (PlayState.isSM) + path = PlayState.pathToSm + "/"; + + var data:BitmapData = BitmapData.fromFile(path + spritePath + ".png"); var sprite:FlxSprite = new FlxSprite(0,0); var imgWidth:Float = FlxG.width / data.width; @@ -369,7 +374,11 @@ class ModchartState case 'philly-nice': songLowercase = 'philly'; } - var result = LuaL.dofile(lua, Paths.lua(songLowercase + "/modchart")); // execute le file + var path = Paths.lua(songLowercase + "/modchart"); + if (PlayState.isSM) + path = PlayState.pathToSm + "/modchart.lua"; + + var result = LuaL.dofile(lua, path); // execute le file if (result != 0) { diff --git a/source/PlayState.hx b/source/PlayState.hx index 921c87b..bbd0d8c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -326,6 +326,8 @@ class PlayState extends MusicBeatState #if windows executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart")); + if (isSM) + executeModchart = FileSystem.exists(pathToSm + "/modchart.lua"); if (executeModchart) PlayStateChangeables.Optimize = false; #end @@ -2333,6 +2335,7 @@ class PlayState extends MusicBeatState { luaModchart.setVar('songPos', Conductor.songPosition); luaModchart.setVar('hudZoom', camHUD.zoom); + luaModchart.setVar('curBeat', HelperFunctions.truncateFloat(curDecimalBeat,3); luaModchart.setVar('cameraZoom', FlxG.camera.zoom); luaModchart.executeState('update', [elapsed]); @@ -4455,7 +4458,6 @@ class PlayState extends MusicBeatState #if windows if (executeModchart && luaModchart != null) { - luaModchart.setVar('curBeat', curBeat); luaModchart.executeState('beatHit', [curBeat]); } #end