Skip to content

Commit

Permalink
Merge branch 'main' into mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
mcagabe19 committed Dec 31, 2024
2 parents 231a049 + a4b6aa3 commit 7548c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2160,19 +2160,19 @@ 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)
{
fps = FlxG.updateFramerate;
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])
{
Expand Down
8 changes: 4 additions & 4 deletions source/debug/FPSCounter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 7548c67

Please sign in to comment.