File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,12 +197,14 @@ protected override void UpdateVisuals()
197197
198198 Background ? . BlurTo ( blurTarget , BACKGROUND_FADE_DURATION , Easing . OutQuint ) ;
199199
200- // When the background is fully dimmed to black there is no visual contribution,
201- // so fade the content to alpha=0. This makes the framework skip the entire
202- // background draw subtree (IsPresent=false), saving GPU fill rate every frame.
200+ // When the background is fully dimmed to black (and not replaced by a storyboard)
201+ // there is no visual contribution, so fade the content to alpha=0. This makes the
202+ // framework skip the entire background draw subtree (IsPresent=false), saving GPU
203+ // fill rate every frame. Do not apply when StoryboardReplacesBackground is active
204+ // because tests (and the UI) rely on Content.Alpha==1 to detect background visibility.
203205 // base.UpdateVisuals() already fades content back to 1 whenever DimLevel drops
204206 // below 1 (e.g. during break lightening), so the background reappears correctly.
205- if ( ContentDisplayed && DimLevel >= 1f )
207+ if ( ContentDisplayed && DimLevel >= 1f && ! StoryboardReplacesBackground . Value )
206208 Content . FadeTo ( 0 , BACKGROUND_FADE_DURATION , Easing . OutQuint ) ;
207209 }
208210 }
Original file line number Diff line number Diff line change @@ -734,6 +734,11 @@ private async Task addItem(MultiplayerPlaylistItem item)
734734
735735 item . ID = ++ lastPlaylistItemId ;
736736
737+ // Assign a PlaylistOrder that is beyond all existing non-expired items so that
738+ // updatePlaylistOrder does not need to re-order items added earlier.
739+ int maxOrder = ServerRoom . Playlist . Where ( i => ! i . Expired ) . Select ( i => ( int ) i . PlaylistOrder ) . DefaultIfEmpty ( - 1 ) . Max ( ) ;
740+ item . PlaylistOrder = ( ushort ) ( maxOrder + 1 ) ;
741+
737742 ServerRoom . Playlist . Add ( item ) ;
738743 ServerAPIRoom . Playlist = ServerAPIRoom . Playlist . Append ( new PlaylistItem ( item ) ) . ToArray ( ) ;
739744 await ( ( IMultiplayerClient ) this ) . PlaylistItemAdded ( clone ( item ) ) . ConfigureAwait ( false ) ;
You can’t perform that action at this time.
0 commit comments