1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 19:33:36 +00:00

last commit, if merged, would've likely caused issues if going from tween to classic

should be fixed now?
This commit is contained in:
nebulazorua 2024-05-15 20:42:11 +08:00
parent 3cc7f7407d
commit fae625a795
2 changed files with 3 additions and 2 deletions

View file

@ -3128,7 +3128,7 @@ class PlayState extends MusicBeatSubState
/** /**
* Resets the camera's zoom level and focus point. * Resets the camera's zoom level and focus point.
*/ */
public function resetCamera(?resetZoom:Bool = true, ?cancelTweens:Bool = true):Void public function resetCamera(?resetZoom:Bool = true, ?cancelTweens:Bool = true, ?snap:Bool = true):Void
{ {
// Cancel camera tweens if any are active. // Cancel camera tweens if any are active.
if (cancelTweens) if (cancelTweens)
@ -3145,7 +3145,7 @@ class PlayState extends MusicBeatSubState
} }
// Snap the camera to the follow point immediately. // Snap the camera to the follow point immediately.
FlxG.camera.focusOn(cameraFollowPoint.getPosition()); if (snap) FlxG.camera.focusOn(cameraFollowPoint.getPosition());
} }
/** /**

View file

@ -127,6 +127,7 @@ class FocusCameraSongEvent extends SongEvent
switch (ease) switch (ease)
{ {
case 'CLASSIC': // Old-school. No ease. Just set follow point. case 'CLASSIC': // Old-school. No ease. Just set follow point.
PlayState.instance.resetCamera(false, false, false);
PlayState.instance.cancelCameraFollowTween(); PlayState.instance.cancelCameraFollowTween();
PlayState.instance.cameraFollowPoint.setPosition(targetX, targetY); PlayState.instance.cameraFollowPoint.setPosition(targetX, targetY);
case 'INSTANT': // Instant ease. Duration is automatically 0. case 'INSTANT': // Instant ease. Duration is automatically 0.