@@ -80,7 +80,7 @@ public override void HandleMenuRpcManagerClearBeatmap(string userId)
80
80
public async override void HandleMenuRpcManagerGetSelectedBeatmap ( string userId )
81
81
{
82
82
ILobbyPlayerDataModel lobbyPlayerDataModel = this . GetLobbyPlayerDataModel ( this . localUserId ) ;
83
- if ( _multiplayerSessionManager . GetPlayerByUserId ( userId ) . HasState ( "modded" ) && lobbyPlayerDataModel ? . beatmapLevel is PreviewBeatmapStub preview )
83
+ if ( lobbyPlayerDataModel != null && MPState . CurrentGameType != MultiplayerGameType . QuickPlay && _multiplayerSessionManager . GetPlayerByUserId ( userId ) . HasState ( "modded" ) && lobbyPlayerDataModel ? . beatmapLevel is PreviewBeatmapStub preview )
84
84
_packetManager . Send ( await PreviewBeatmapPacket . FromPreview ( preview , lobbyPlayerDataModel . beatmapCharacteristic . serializedName , lobbyPlayerDataModel . beatmapDifficulty ) ) ;
85
85
else if ( lobbyPlayerDataModel != null && lobbyPlayerDataModel . beatmapLevel != null )
86
86
this . _menuRpcManager . SelectBeatmap ( new BeatmapIdentifierNetSerializable ( lobbyPlayerDataModel . beatmapLevel . levelID , lobbyPlayerDataModel . beatmapCharacteristic . serializedName , lobbyPlayerDataModel . beatmapDifficulty ) ) ;
@@ -109,7 +109,7 @@ public async override void HandleMenuRpcManagerSelectedBeatmap(string userId, Be
109
109
if ( localPreview != null )
110
110
preview = new PreviewBeatmapStub ( hash , localPreview ) ;
111
111
if ( preview == null )
112
- preview = await FetchBeatSaverPreview ( hash ) ;
112
+ preview = await FetchBeatSaverPreview ( beatmapId . levelID , hash ) ;
113
113
HMMainThreadDispatcher . instance . Enqueue ( ( ) => base . SetPlayerBeatmapLevel ( userId , preview , beatmapId . difficulty , characteristic ) ) ;
114
114
}
115
115
}
@@ -123,7 +123,7 @@ public async override void HandleMenuRpcManagerSelectedBeatmap(string userId, Be
123
123
public async new void SetLocalPlayerBeatmapLevel ( string levelId , BeatmapDifficulty beatmapDifficulty , BeatmapCharacteristicSO characteristic )
124
124
{
125
125
string ? hash = Utilities . Utils . LevelIdToHash ( levelId ) ;
126
- Plugin . Log ? . Debug ( $ "Local user selected song '{ hash } '.") ;
126
+ Plugin . Log ? . Debug ( $ "Local user selected song '{ hash ?? levelId } '.") ;
127
127
if ( hash != null )
128
128
{
129
129
if ( _playersData . Values . Any ( playerData => playerData . beatmapLevel ? . levelID == levelId ) )
@@ -139,7 +139,7 @@ public async override void HandleMenuRpcManagerSelectedBeatmap(string userId, Be
139
139
if ( localPreview != null )
140
140
preview = new PreviewBeatmapStub ( hash , localPreview ) ;
141
141
if ( preview == null )
142
- preview = await FetchBeatSaverPreview ( hash ) ;
142
+ preview = await FetchBeatSaverPreview ( levelId , hash ) ;
143
143
144
144
HMMainThreadDispatcher . instance . Enqueue ( ( ) => base . SetPlayerBeatmapLevel ( base . localUserId , preview , beatmapDifficulty , characteristic ) ) ;
145
145
_packetManager . Send ( await PreviewBeatmapPacket . FromPreview ( preview , characteristic . serializedName , beatmapDifficulty ) ) ;
@@ -195,12 +195,12 @@ private void OnSelectedBeatmap(string userId, BeatmapIdentifierNetSerializable?
195
195
/// <summary>
196
196
/// Creates a preview from a BeatSaver request.
197
197
/// </summary>
198
- public async Task < PreviewBeatmapStub ? > FetchBeatSaverPreview ( string hash )
198
+ public async Task < PreviewBeatmapStub ? > FetchBeatSaverPreview ( string levelID , string hash )
199
199
{
200
200
try
201
201
{
202
202
Beatmap bm = await Plugin . BeatSaver . Hash ( hash ) ;
203
- return new PreviewBeatmapStub ( bm ) ;
203
+ return new PreviewBeatmapStub ( levelID , bm ) ;
204
204
}
205
205
catch ( Exception ex )
206
206
{
0 commit comments