1
0
Fork 0

Fix fading out: set pure black at the end

This commit is contained in:
ivan tkachenko 2025-07-30 16:35:55 +03:00
parent 667368d719
commit c689198588
2 changed files with 5 additions and 5 deletions

View File

@ -4,6 +4,7 @@
- Added LobbyCompatibility to dependencies to avoid desync issues.
- Fixed lyrics not being displayed in some situations.
- Fixed minor visual issue with the fade out effect.
## MuzikaGromche 13.37.911 - Sri Lanka Bus hotfix

View File

@ -1144,7 +1144,7 @@ namespace MuzikaGromche
private SetLightsColorEvent? GetColorEvent(BeatTimeSpan loopOffsetSpan, BeatTimestamp windUpOffsetTimestamp)
{
if (FadeOut(loopOffsetSpan) is { } colorEvent1)
if (FadeOut(loopOffsetSpan, windUpOffsetTimestamp) is { } colorEvent1)
{
return colorEvent1;
}
@ -1157,15 +1157,14 @@ namespace MuzikaGromche
return null;
}
private SetLightsColorTransitionEvent? FadeOut(BeatTimeSpan loopOffsetSpan)
private SetLightsColorTransitionEvent? FadeOut(BeatTimeSpan loopOffsetSpan, BeatTimestamp windUpOffsetTimestamp)
{
var beat = loopOffsetSpan.BeatToInclusive;
var fadeOutStart = track.FadeOutBeat;
var fadeOutEnd = fadeOutStart + track.FadeOutDuration;
if (track.FadeOutBeat < beat && beat <= fadeOutEnd)
if (windUpOffsetTimestamp.Beat < 0f && track.FadeOutBeat < loopOffsetSpan.BeatToInclusive && loopOffsetSpan.BeatFromExclusive <= fadeOutEnd)
{
var t = (beat - track.FadeOutBeat) / track.FadeOutDuration;
var t = (loopOffsetSpan.BeatToInclusive - track.FadeOutBeat) / track.FadeOutDuration;
return new SetLightsColorTransitionEvent(Color.white, Color.black, Easing.Linear, t);
}
else