diff --git a/README.md b/README.md index 0c35ee6e..d28e38a0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Friday Night Funkin' - Codename Engine (WIP) -## PLEASE NOTE - THIS IS STILL IN AN ALPHA STATE +## PLEASE NOTE - THIS IS STILL IN A BETA STATE Early alpha of Codename Engine, known issues: - Some options are missing diff --git a/buildnumber.txt b/buildnumber.txt index d9bc155c..a562b57e 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1812 \ No newline at end of file +1799 diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index fb8ce94c..66666854 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -524,9 +524,8 @@ class PlayState extends MusicBeatState Paths.getFolderContent('data/charts/', false, true, !fromMods)]) { for(file in content) { var ext = Path.extension(file).toLowerCase(); - if (Script.scriptExtensions.contains(ext)) { + if (Script.scriptExtensions.contains(ext)) scripts.add(Script.create(file)); - } } } } diff --git a/source/funkin/system/Conductor.hx b/source/funkin/system/Conductor.hx index 3bcfd211..180e3dab 100644 --- a/source/funkin/system/Conductor.hx +++ b/source/funkin/system/Conductor.hx @@ -152,7 +152,7 @@ class Conductor var lastPos = lastSongPos; if (lastSongPos != (lastSongPos = FlxG.sound.music.time)) { // update conductor - var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Lib.getTimer())); + var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Main.time)); var elapsedAL = (lastSongPos - lastPos); speed = FlxMath.bound(FlxMath.lerp(speed, timeUntilUpdate / elapsedAL, timeUntilUpdate / 1000), 0.85, 1.15); songPosition = lastSongPos; diff --git a/source/funkin/system/Main.hx b/source/funkin/system/Main.hx index 7aaacdd2..7236f89f 100644 --- a/source/funkin/system/Main.hx +++ b/source/funkin/system/Main.hx @@ -12,7 +12,7 @@ import funkin.options.Options; import flixel.FlxGame; import flixel.FlxState; import openfl.Assets; -import openfl.Lib; +import flash.Lib; import openfl.display.FPS; import openfl.display.Sprite; import openfl.events.Event; @@ -47,6 +47,8 @@ class Main extends Sprite var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode. var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets + public static var time:Int = 0; + // You can pretty much ignore everything from here on - your code should go in your states. #if sys @@ -126,7 +128,13 @@ class Main extends Sprite #end } + private static function getTimer():Int { + return time = Lib.getTimer(); + } + public function loadGameSettings() { + @:privateAccess + FlxG.game.getTimer = getTimer; #if sys for(i in 0...4) gameThreads.push(Thread.createWithEventLoop(function() {Thread.current().events.promise();}));