From 8467ec3306438ab7df074345a3949687a3499531 Mon Sep 17 00:00:00 2001 From: Vortex <73261680+Vortex2Oblivion@users.noreply.github.com> Date: Thu, 22 Aug 2024 18:44:34 -0400 Subject: [PATCH] fix crash handeler not working hopefully --- Project.xml | 2 -- docs/docs.hxml | 6 ++++++ source/game/Conductor.hx | 17 ++++++++++++++--- source/states/PlayState.hx | 3 --- source/toolbox/ToolboxPlaceholder.hx | 6 +++--- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Project.xml b/Project.xml index 537c9b7bb2..1229c531fd 100644 --- a/Project.xml +++ b/Project.xml @@ -127,8 +127,6 @@ - - diff --git a/docs/docs.hxml b/docs/docs.hxml index 8c84c4dbb7..6845094212 100644 --- a/docs/docs.hxml +++ b/docs/docs.hxml @@ -21,6 +21,11 @@ --define MODDING_ALLOWED --define MODCHARTING_TOOLS --define LEATHER +--define FLX_NO_HEALTH +--define FLX_NO_DEBUG +--define FLX_NO_POINT_POOL +--define CUSTOM_CLASSES +--define message.reporting pretty --macro lime._internal.macros.DefineMacro.run() --macro openfl.utils._internal.ExtraParamsMacro.include() @@ -41,3 +46,4 @@ --cpp docs-bin/ -dce no + diff --git a/source/game/Conductor.hx b/source/game/Conductor.hx index 01e14a65e9..f7f22715f7 100644 --- a/source/game/Conductor.hx +++ b/source/game/Conductor.hx @@ -17,11 +17,22 @@ typedef TimeScaleChangeEvent = { } class Conductor { + /** + * The BPM (Beats Per Minute) of the current song. + */ public static var bpm:Float = 100; - public static var crochet:Float = ((60 / bpm) * 1000); // beats in milliseconds - public static var stepCrochet:Float = crochet / 4; // steps in milliseconds + /** + * Beats in milliseconds + */ + public static var crochet:Float = ((60 / bpm) * 1000); + /** + * Steps in milliseconds + */ + public static var stepCrochet:Float = crochet / 4; + /** + * The position of the song in milliseconds. + */ public static var songPosition:Float; - public static var lastSongPos:Float; public static var offset:Float = 0; public static var safeFrames:Int = 10; diff --git a/source/states/PlayState.hx b/source/states/PlayState.hx index cd8a7d7065..9e65f0f92b 100644 --- a/source/states/PlayState.hx +++ b/source/states/PlayState.hx @@ -1704,8 +1704,6 @@ class PlayState extends MusicBeatState { var noteBG:FlxSprite; - var babyArrow:StrumNote; - public function generateStaticArrows(pos:Float, ?isPlayer:Bool = false, ?showReminders:Bool = true):Void { call("generateStaticArrows", [pos, isPlayer, showReminders]); var usedKeyCount:Int = SONG.keyCount; @@ -2532,7 +2530,6 @@ class PlayState extends MusicBeatState { crochet: Conductor.crochet, stepCrochet: Conductor.stepCrochet, songPosition: Conductor.songPosition, - lastSongPos: Conductor.lastSongPos, offset: Conductor.offset, safeFrames: Conductor.safeFrames, safeZoneOffset: Conductor.safeZoneOffset, diff --git a/source/toolbox/ToolboxPlaceholder.hx b/source/toolbox/ToolboxPlaceholder.hx index b2cc4ab077..337b560d2e 100644 --- a/source/toolbox/ToolboxPlaceholder.hx +++ b/source/toolbox/ToolboxPlaceholder.hx @@ -16,7 +16,7 @@ import lime.utils.Assets; import toolbox.StageMakingState; import toolbox.util.NewModState; -class ToolboxPlaceholder extends states.MusicBeatState { +class ToolboxPlaceholder extends MusicBeatState { var curSelected:Int = 0; var ui_Skin:Null; @@ -110,8 +110,8 @@ class ToolboxPlaceholder extends states.MusicBeatState { super.update(elapsed); if (!inMenu) { - if (-1 * Math.floor(FlxG.mouse.wheel) != 0) { - curSelected -= 1 * Math.floor(FlxG.mouse.wheel); + if (-Math.floor(FlxG.mouse.wheel) != 0) { + curSelected -= Math.floor(FlxG.mouse.wheel); FlxG.sound.play(Paths.sound('scrollMenu'), 0.4); }