From 9982236321afd36adb0d7dca13918b39f9fa1c0b Mon Sep 17 00:00:00 2001 From: Ralty <78720179+Raltyro@users.noreply.github.com> Date: Mon, 30 Jun 2025 22:29:21 +0700 Subject: [PATCH] Whoops! --- source/funkin/backend/chart/EventsData.hx | 6 ++++-- source/funkin/backend/system/Conductor.hx | 4 ++-- source/funkin/game/PlayState.hx | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/source/funkin/backend/chart/EventsData.hx b/source/funkin/backend/chart/EventsData.hx index a46de554..7dd01197 100644 --- a/source/funkin/backend/chart/EventsData.hx +++ b/source/funkin/backend/chart/EventsData.hx @@ -22,8 +22,10 @@ class EventsData { {name: "Camera", type: TDropDown(['camGame', 'camHUD']), defValue: "camGame"} ], "Camera Modulo Change" => [ - {name: "Modulo Interval (Beats)", type: TInt(1, 9999999, 1), defValue: 4}, - {name: "Bump Strength", type: TFloat(0.1, 10, 0.01, 2), defValue: 1} + {name: "Modulo Interval", type: TInt(1, 9999999, 1), defValue: 4}, + {name: "Bump Strength", type: TFloat(0.1, 10, 0.01, 2), defValue: 1}, + {name: "Every Beat Type", type: TDropDown(['BEAT', 'MEASURE', 'STEP']), defValue: 'BEAT'}, + {name: "Beat Offset", type: TFloat(-10, 10, 0.25, 2), defValue: 0} ], "Camera Flash" => [ {name: "Reversed?", type: TBool, defValue: false}, diff --git a/source/funkin/backend/system/Conductor.hx b/source/funkin/backend/system/Conductor.hx index d535a9a9..c7a2de63 100644 --- a/source/funkin/backend/system/Conductor.hx +++ b/source/funkin/backend/system/Conductor.hx @@ -7,9 +7,9 @@ import funkin.backend.system.interfaces.IBeatReceiver; import funkin.editors.charter.Charter; enum BeatType { - STEP; BEAT; MEASURE; + STEP; } @:structInit @@ -38,7 +38,7 @@ final class Conductor default: curBeatFloat; } if (interval <= 0) return beat - offset; - else return Math.floor((beat - offset) * interval) / interval; + else return Math.floor((beat - offset) / interval) * interval; } /** diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index bbb95c49..ba920a5e 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1468,6 +1468,12 @@ class PlayState extends MusicBeatState case "Camera Modulo Change": camZoomingInterval = event.params[0]; camZoomingStrength = event.params[1]; + camZoomingEvery = switch (event.params[2].toUpperCase()) { + case "STEP": STEP; + case "MEASURE": MEASURE; + default: BEAT; + } + camZoomingOffset = event.params[2]; case "Camera Flash": var camera:FlxCamera = event.params[3] == "camHUD" ? camHUD : camGame;