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;