Skip to content

Commit

Permalink
Also fix updating of struct in another place
Browse files Browse the repository at this point in the history
  • Loading branch information
enteryournamehere committed Aug 28, 2023
1 parent 57a0687 commit a93030e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,11 @@ private async Task OnPlayerLoad(Player player)
RacingPlayerInfo playerInfo;

if (IsPlayerRegistered(player)) {
playerInfo = Players.Find(info => info.Player.Id == player.Id);
var playerInfoIndex = Players.FindIndex(info => info.Player.Id == player.Id);
playerInfo = Players[playerInfoIndex];
playerInfo.Player = player;
playerInfo.PlayerLoaded = true;
Players[playerInfoIndex] = playerInfo;
} else {
playerInfo = new RacingPlayerInfo
{
Expand Down

0 comments on commit a93030e

Please sign in to comment.