fix: Racing end of race leaderboards now work (#1317)

* Fix UB in remote input info

Yes i should have made this first
no this wouldnt have happened with rust

* fix end of race leaderboard

Tested that with two players, both players see the others time at the end of the race and all other metrics are shown correctly.

Technically the outBitStream->Write(static_cast<uint16_t>(m_RacingPlayers.size())); should only be written once but how we do it now it is written as we load players in and this is the cheap option compared to the number of bits we are supposed to waste at the end of races
This commit is contained in:
David Markowitz
2023-11-24 01:46:26 -08:00
committed by GitHub
parent af70f871cb
commit 8a15906885
2 changed files with 52 additions and 64 deletions

View File

@@ -151,13 +151,6 @@ public:
*/
RacingPlayerInfo* GetPlayerData(LWOOBJID playerID);
/**
* Formats a time to a string, currently unused
* @param time the time to format
* @return the time formatted as string
*/
static std::string FormatTimeString(time_t time);
private:
/**
@@ -251,4 +244,5 @@ private:
* Value for message box response to know if we are exiting the race via the activity dialogue
*/
const int32_t m_ActivityExitConfirm = 1;
bool m_AllPlayersReady = false;
};