From 08e8530ad4c29d2b9454b3f155d94baad16290e4 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Fri, 5 Apr 2024 02:44:44 -0400 Subject: [PATCH] Fix SetCameraBopSongEvent to be additive --- art | 2 +- source/funkin/play/PlayState.hx | 3 ++- source/funkin/play/event/SetCameraBopSongEvent.hx | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/art b/art index 03e7c2a23..00463685f 160000 --- a/art +++ b/art @@ -1 +1 @@ -Subproject commit 03e7c2a2353b184e45955c96d763b7cdf1acbc34 +Subproject commit 00463685fa570f0c853d08e250b46ef80f30bc48 diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index de8597c17..0ee85ac9b 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -866,7 +866,7 @@ class PlayState extends MusicBeatSubState // Reset camera zooming cameraBopIntensity = Constants.DEFAULT_BOP_INTENSITY; - hudCameraZoomIntensity = 0.015 * 2.0; + hudCameraZoomIntensity = (cameraBopIntensity - 1.0) * 2.0; cameraZoomRate = Constants.DEFAULT_ZOOM_RATE; health = Constants.HEALTH_STARTING; @@ -976,6 +976,7 @@ class PlayState extends MusicBeatSubState FlxG.watch.addQuick('bfAnim', currentStage.getBoyfriend().getCurrentAnimation()); } FlxG.watch.addQuick('health', health); + FlxG.watch.addQuick('cameraBopIntensity', cameraBopIntensity); // TODO: Add a song event for Handle GF dance speed. diff --git a/source/funkin/play/event/SetCameraBopSongEvent.hx b/source/funkin/play/event/SetCameraBopSongEvent.hx index 9d3e785ed..f3efc04e3 100644 --- a/source/funkin/play/event/SetCameraBopSongEvent.hx +++ b/source/funkin/play/event/SetCameraBopSongEvent.hx @@ -50,8 +50,8 @@ class SetCameraBopSongEvent extends SongEvent var intensity:Null = data.getFloat('intensity'); if (intensity == null) intensity = 1.0; - PlayState.instance.cameraBopIntensity = Constants.DEFAULT_BOP_INTENSITY * intensity; - PlayState.instance.hudCameraZoomIntensity = 1.015 * intensity * 2.0; + PlayState.instance.cameraBopIntensity = (Constants.DEFAULT_BOP_INTENSITY - 1.0) * intensity + 1.0; + PlayState.instance.hudCameraZoomIntensity = (Constants.DEFAULT_BOP_INTENSITY - 1.0) * intensity * 2.0; PlayState.instance.cameraZoomRate = rate; trace('Set camera zoom rate to ${PlayState.instance.cameraZoomRate}'); }