Conversation
rcelyte
left a comment
There was a problem hiding this comment.
A few issues here that break BeatSaver downloads, and bad MpBeatmapPacket ordering will likely cause problems down the line (looking at that TODO in HandleMpCoreBeatmapPacket()).
More personally, I depend on MpBeatmapPackets arriving early for entitlement checks client-side (SongCore requirements of not yet downloaded maps), as well as public room listing server-side (displaying the name of the currently selected level, which may not exist on BeatSaver).
|
|
||
| if (userId == _multiplayerSessionManager.localPlayer.userId) | ||
| // If local player: send extended beatmap info to other players | ||
| _ = SendMpBeatmapPacket(beatmapKey); |
There was a problem hiding this comment.
This needs to be done synchronously in a prefix to LobbyPlayersDataModel.SetLocalPlayerBeatmapLevel() so the information is guaranteed to arrive before the base game's RecommendBeatmap message.
| => Deactivate(); | ||
|
|
||
| private void HandleMpexBeatmapPacket(MpBeatmapPacket packet, IConnectedPlayer player) | ||
| private new void SetPlayerBeatmapLevel(string userId, in BeatmapKey beatmapKey) |
There was a problem hiding this comment.
This method is never called since the base isn't virtual.
| if (levelHash == null) | ||
| return; | ||
|
|
||
| var levelData = await _beatmapLevelProvider.GetBeatmap(levelHash); |
There was a problem hiding this comment.
Given SendMpBeatmapPacket() is only ever used with locally selected beatmaps, I believe dropping the async and using _beatmapLevelProvider.GetBeatmapFromLocalBeatmaps() would make more sense here (and help with ordering issue mentioned above).
| } | ||
|
|
||
| [UsedImplicitly] | ||
| public new void Tick() |
There was a problem hiding this comment.
This method is never called since the base isn't virtual, leading to a softlock after downloads from BeatSaver finish.
| } | ||
|
|
||
| [UsedImplicitly] | ||
| public new void LoadLevel(ILevelGameplaySetupData gameplaySetupData, long initialStartTime) |
There was a problem hiding this comment.
This method is never called since the base isn't virtual, leading to BeatSaver downloads never starting.
No description provided.