diff --git a/source/PlayState.hx b/source/PlayState.hx index ce6b86f1b4e..203f1a24a57 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2160,7 +2160,7 @@ class PlayState extends MusicBeatState var fps:Float = 60; var bfCanPan:Bool = false; var dadCanPan:Bool = false; - var clear:Bool = false; + var doPan:Bool = false; function camPanRoutine(anim:String = 'singUP', who:String = 'bf'):Void { if (SONG.notes[curSection] != null) { @@ -2168,11 +2168,11 @@ class PlayState extends MusicBeatState bfCanPan = SONG.notes[curSection].mustHitSection; dadCanPan = !SONG.notes[curSection].mustHitSection; switch (who) { - case 'bf' | 'boyfriend': clear = bfCanPan; - case 'oppt' | 'dad': clear = dadCanPan; + case 'bf' | 'boyfriend': doPan = bfCanPan; + case 'oppt' | 'dad': doPan = dadCanPan; } //FlxG.elapsed is stinky poo poo for this, it just makes it look jank as fuck - if (clear) { + if (doPan) { if (fps == 0) fps = 1; switch (anim.split('-')[0]) { diff --git a/source/debug/FPSCounter.hx b/source/debug/FPSCounter.hx index 35ed2a6e4ac..7d61cbf78d0 100644 --- a/source/debug/FPSCounter.hx +++ b/source/debug/FPSCounter.hx @@ -43,10 +43,12 @@ class FPSCounter extends TextField var fpsMultiplier:Float = 1.0; var deltaTimeout:Float = 0.0; public var timeoutDelay:Float = 50; + var now:Float = 0; // Event Handlers override function __enterFrame(deltaTime:Float):Void { - final now:Float = haxe.Timer.stamp() * 1000; + if (!ClientPrefs.showFPS) return; + now = haxe.Timer.stamp() * 1000; times.push(now); while (times[0] < now - 1000 / fpsMultiplier) times.shift(); if (deltaTimeout <= timeoutDelay) @@ -89,11 +91,9 @@ class FPSCounter extends TextField public dynamic function updateText():Void // so people can override it in hscript { - text = (ClientPrefs.showFPS ? "FPS: " + (ClientPrefs.ffmpegMode ? ClientPrefs.targetFPS : Math.round(currentFPS)) : ""); + text = "FPS: " + (ClientPrefs.ffmpegMode ? ClientPrefs.targetFPS : Math.round(currentFPS)); if (ClientPrefs.ffmpegMode) - { text += " (Rendering Mode)"; - } if (ClientPrefs.showRamUsage) text += "\nRAM: " + FlxStringUtil.formatBytes(memory) + (ClientPrefs.showMaxRamUsage ? " / " + FlxStringUtil.formatBytes(mempeak) : ""); if (ClientPrefs.debugInfo)