Merge branch 'develop' into rewrite/master

This commit is contained in:
Cameron Taylor 2024-06-09 15:30:14 -04:00
commit d974f12c72
5 changed files with 41 additions and 21 deletions

View file

@ -41,4 +41,4 @@ labels: bug
## If you're game is FROZEN and you're playing a web version, press F12 to open up browser dev window, and go to console, and copy-paste whatever red error you're getting
## If your game is FROZEN and you're playing a web version, press F12 to open up browser dev window, and go to console, and copy-paste whatever red error you're getting

View file

@ -23,3 +23,4 @@
# Troubleshooting
- During the cloning process, you may experience an error along the lines of `error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)` due to poor connectivity. A common fix is to run ` git config --global http.postBuffer 4096M`.

View file

@ -1211,6 +1211,9 @@ class PlayState extends MusicBeatSubState
cameraTweensPausedBySubState.add(cameraZoomTween);
}
// Pause camera follow
FlxG.camera.followLerp = 0;
for (tween in scrollSpeedTweens)
{
if (tween != null && tween.active)
@ -1255,6 +1258,9 @@ class PlayState extends MusicBeatSubState
}
cameraTweensPausedBySubState.clear();
// Resume camera follow
FlxG.camera.followLerp = Constants.DEFAULT_CAMERA_FOLLOW_RATE;
if (currentConversation != null)
{
currentConversation.resumeMusic();
@ -2270,11 +2276,20 @@ class PlayState extends MusicBeatSubState
if (holdNote == null || !holdNote.alive) continue;
// While the hold note is being hit, and there is length on the hold note...
if (!isBotPlayMode && holdNote.hitNote && !holdNote.missedNote && holdNote.sustainLength > 0)
if (holdNote.hitNote && !holdNote.missedNote && holdNote.sustainLength > 0)
{
// Grant the player health.
health += Constants.HEALTH_HOLD_BONUS_PER_SECOND * elapsed;
songScore += Std.int(Constants.SCORE_HOLD_BONUS_PER_SECOND * elapsed);
if (!isBotPlayMode)
{
health += Constants.HEALTH_HOLD_BONUS_PER_SECOND * elapsed;
songScore += Std.int(Constants.SCORE_HOLD_BONUS_PER_SECOND * elapsed);
}
// Make sure the player keeps singing while the note is held by the bot.
if (isBotPlayMode && currentStage != null && currentStage.getBoyfriend() != null && currentStage.getBoyfriend().isSinging())
{
currentStage.getBoyfriend().holdTimer = 0;
}
}
if (holdNote.missedNote && !holdNote.handledMiss)
@ -3070,7 +3085,7 @@ class PlayState extends MusicBeatSubState
FlxG.camera.targetOffset.x += 20;
// Replace zoom animation with a fade out for now.
camGame.fade(FlxColor.BLACK, 0.6);
FlxG.camera.fade(FlxColor.BLACK, 0.6);
FlxTween.tween(camHUD, {alpha: 0}, 0.6,
{
@ -3165,7 +3180,7 @@ class PlayState extends MusicBeatSubState
cancelAllCameraTweens();
}
FlxG.camera.follow(cameraFollowPoint, LOCKON, 0.04);
FlxG.camera.follow(cameraFollowPoint, LOCKON, Constants.DEFAULT_CAMERA_FOLLOW_RATE);
FlxG.camera.targetOffset.set();
if (resetZoom)

View file

@ -230,6 +230,12 @@ class FreeplayState extends MusicBeatSubState
FlxTransitionableState.skipNextTransIn = true;
// dedicated camera for the state so we don't need to fuk around with camera scrolls from the mainmenu / elsewhere
funnyCam = new FunkinCamera('freeplayFunny', 0, 0, FlxG.width, FlxG.height);
funnyCam.bgColor = FlxColor.TRANSPARENT;
FlxG.cameras.add(funnyCam, false);
this.cameras = [funnyCam];
if (stickerSubState != null)
{
this.persistentUpdate = true;
@ -657,6 +663,9 @@ class FreeplayState extends MusicBeatSubState
alsoOrangeLOL.visible = true;
grpTxtScrolls.visible = true;
// render optimisation
if (_parentState != null) _parentState.persistentDraw = false;
cardGlow.visible = true;
FlxTween.tween(cardGlow, {alpha: 0, "scale.x": 1.2, "scale.y": 1.2}, 0.45, {ease: FlxEase.sineOut});
@ -1576,6 +1585,8 @@ class FreeplayState extends MusicBeatSubState
{
clearDaCache(daSong.songName);
}
// remove and destroy freeplay camera
FlxG.cameras.remove(funnyCam);
}
function changeDiff(change:Int = 0, force:Bool = false):Void

View file

@ -25,6 +25,8 @@ class OptionsState extends MusicBeatState
override function create():Void
{
persistentUpdate = true;
var menuBG = new FlxSprite().loadGraphic(Paths.image('menuBG'));
var hsv = new HSVShader();
hsv.hue = -0.6;
@ -55,8 +57,6 @@ class OptionsState extends MusicBeatState
setPage(Controls);
}
// disable for intro transition
currentPage.enabled = false;
super.create();
}
@ -86,13 +86,6 @@ class OptionsState extends MusicBeatState
}
}
override function finishTransIn()
{
super.finishTransIn();
currentPage.enabled = true;
}
function switchPage(name:PageName)
{
// TODO: Animate this transition?
@ -266,11 +259,11 @@ class OptionsMenu extends Page
#end
}
enum PageName
enum abstract PageName(String)
{
Options;
Controls;
Colors;
Mods;
Preferences;
var Options = "options";
var Controls = "controls";
var Colors = "colors";
var Mods = "mods";
var Preferences = "preferences";
}