Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing consecutive races causes the cars to be rendered incorrectly #1

Open
luizppa opened this issue Dec 1, 2018 · 0 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@luizppa
Copy link
Owner

luizppa commented Dec 1, 2018

When playing multiple consecutive races causes the cars to be incorrectly ordered on the **cars array (global variable in helpers/game.c) therefore, causing them to be rendered in an incorrect order and also affecting things like placements.
Running a few tests i could realize that the cars array stays ordered like it has been at the end of the first race placed, which should not happen since the array goes through a quick sort each time the game is updated. To avoid this i started cleaning the cars array at the end of each race (on void clear_game() at helpers/game.c line 717) and refilling it at each race start (on void setup() at helpers/game.c lines 583 and 589) but it does not seem to be of any help.

@luizppa luizppa added bug Something isn't working help wanted Extra attention is needed labels Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant