Hi,
I was in the Calico Desert festival. I launched the race, placed my bet, the race took place and when it ended, I got back to the merchant to get my prize (the snail won, he's surprisingly fast but I believed in him all along), and the game crashed as soon as I talked to the merchant.
...
To add to this to hopefully get it fixed in the next patch (1.6.9 soon pls?):
This crash occurs when collecting the rewards but I believe the bug itself is in the OnRaceWon function. Specifically this section here:
Code:
if (winner == 3 && !this.specialRewardsCollected.ContainsKey(kvp.Key)) {
this.specialRewardsCollected[kvp.Key] = false;
continue;
}
if (!this.rewardsToCollect.ContainsKey(kvp.Key)) {
this.rewardsToCollect[kvp.Key] = 0;
}
this.rewardsToCollect[kvp.Key]++;
If you get the special reward for the first time in a day racer 3 wins, then it doesn't set the key to collect rewards, and as a bonus it also doesn't set you as a winning farmer just below. This then causes the crash when in CollectRacePrizes it tries to obtain the value this.rewardsToCollect[Game1.player.UniqueMultiplayerID].
As this was not set as the loop was exitted prematurely, it causes the crash.
I think it would be better if the code was changed to:
Code:
if (!this.rewardsToCollect.ContainsKey(kvp.Key)) {
this.rewardsToCollect[kvp.Key] = 0;
}
if (winner == 3 && !this.specialRewardsCollected.ContainsKey(kvp.Key)) {
this.specialRewardsCollected[kvp.Key] = false;
} else {
this.rewardsToCollect[kvp.Key]++;
}
That way the key is set, so no crash, and the rest of the code in the loop runs to set you to be a winning farmer.