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

Fix segfault in coll check #191

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

madebr
Copy link
Collaborator

@madebr madebr commented Sep 30, 2022

Fixes #188

@@ -5593,161 +5584,153 @@ int CrashCarsTogetherSinglePass(br_scalar dt, int pPass, tCollison_data* collide
collide_list[i].car = car_2;
collided++;
}
} else if (collide_list[i].car || collide_list[j].car) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how comfortable I feel with this large scale refactoring. On one hand the proposed code for sure looks more sensible, but I don't think I can look at the changes hard enough to know that we haven't introduced a subtle strange behavior. And rewriting the flow makes it very difficult to go back and step through following the OG code in a debugger.

I actually don't know how to handle this. One idea is to wait until the single player game is (more or less) complete before cleaning the code up too much, and hopefully at that time we aren't comparing OG code? Do we break the PR into two? Everything above this line is easy to merge right now. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no refactoring, it's the same code with less indentations.

Copy link
Collaborator Author

@madebr madebr Sep 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll move the indentation patch to a separate pr.

@dethrace-labs dethrace-labs merged commit e741362 into dethrace-labs:main Oct 1, 2022
@madebr madebr deleted the fix-segfault-in-CollCheck branch October 1, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentation fault when running into tire wall
2 participants