@@ -910,9 +910,9 @@ DETOUR(Client::SetPanelStats) {
910910 bool showLp = sar.game ->Is (SourceGame_Portal2) && AutoSubmit::IsLpAvailable ();
911911
912912 /* set time/portals button visible (only in p2 though) */
913- if (showLp) {
913+ if (showLp)
914914 Memory::VMT<void (__rescall *)(void *, bool )>(m_pLeaderboardListButton, Offsets::Panel_SetVisible)(m_pLeaderboardListButton, true ); // Panel::SetVisible
915- } else
915+ else
916916 m_CurrentLeaderboardType = 1 ;
917917
918918 /* set boards visible */
@@ -943,7 +943,6 @@ DETOUR(Client::SetPanelStats) {
943943 g_allocatedAvatars.clear ();
944944
945945 /* add scores */
946- // TODO: maybe integrate LP boards too in the future?
947946 if (m_CurrentLeaderboardType == 1 /* times */ ) {
948947 const auto × = AutoSubmit::GetTimes ();
949948
@@ -953,12 +952,12 @@ DETOUR(Client::SetPanelStats) {
953952 client->AddAvatarPanelItem (m_pLeaderboard, m_pStatList, &time, time.score , 1 , -1 , i, m_nStatHeight, -1 , 0 );
954953 }
955954 } else /* portals */ {
956- const auto × = AutoSubmit::GetPortals ();
955+ const auto &scores = AutoSubmit::GetPortals ();
957956
958- for (size_t i = 0 ; i < times .size (); ++i) {
959- const auto &time = times [i];
957+ for (size_t i = 0 ; i < scores .size (); ++i) {
958+ const auto &score = scores [i];
960959
961- client->AddAvatarPanelItem (m_pLeaderboard, m_pStatList, &time, time .score , 0 , -1 , i, m_nStatHeight, -1 , 0 );
960+ client->AddAvatarPanelItem (m_pLeaderboard, m_pStatList, &score, score .score , 0 , -1 , i, m_nStatHeight, -1 , 0 );
962961 }
963962 }
964963
0 commit comments