Fix fading out: set pure black at the end
This commit is contained in:
		
							parent
							
								
									667368d719
								
							
						
					
					
						commit
						c689198588
					
				|  | @ -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 | ||||
| 
 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue