Skip to content

WIP 1.35.0#49

Closed
roydejong wants to merge 7 commits intoGoobwabber:devfrom
roydejong:dev-1.35.0
Closed

WIP 1.35.0#49
roydejong wants to merge 7 commits intoGoobwabber:devfrom
roydejong:dev-1.35.0

Conversation

@roydejong
Copy link
Copy Markdown
Collaborator

No description provided.

@roydejong roydejong marked this pull request as draft March 26, 2024 19:02
Copy link
Copy Markdown
Contributor

@rcelyte rcelyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is never called since the base isn't virtual.

if (levelHash == null)
return;

var levelData = await _beatmapLevelProvider.GetBeatmap(levelHash);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is never called since the base isn't virtual, leading to BeatSaver downloads never starting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants