Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/packets.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def bot_stats(player: Player) -> bytes:
(0, osuTypes.i32), # plays
(0, osuTypes.i64), # tscore
(0, osuTypes.i32), # rank
(0, osuTypes.i16), # pp
(0, osuTypes.u16), # pp
)


Expand All @@ -848,7 +848,7 @@ def _user_stats(
global_rank: int,
pp: int,
) -> bytes:
if pp > 0x7FFF:
if pp > 0xFFFF:
# HACK: if pp is over osu!'s ingame cap,
# we can instead display it as ranked score
ranked_score = pp
Expand All @@ -868,13 +868,13 @@ def _user_stats(
(plays, osuTypes.i32),
(total_score, osuTypes.i64),
(global_rank, osuTypes.i32),
(pp, osuTypes.i16),
(pp, osuTypes.u16),
)


def user_stats(player: Player) -> bytes:
gm_stats = player.gm_stats
if gm_stats.pp > 0x7FFF:
if gm_stats.pp > 0xFFFF:
# HACK: if pp is over osu!'s ingame cap,
# we can instead display it as ranked score
rscore = gm_stats.pp
Expand All @@ -897,7 +897,7 @@ def user_stats(player: Player) -> bytes:
(gm_stats.plays, osuTypes.i32),
(gm_stats.tscore, osuTypes.i64),
(gm_stats.rank, osuTypes.i32),
(pp, osuTypes.i16), # why not u16 peppy :(
(pp, osuTypes.u16),
)


Expand Down
Loading