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

MI_LArrow cleanup #1548

Merged
merged 1 commit into from
Sep 5, 2019
Merged

MI_LArrow cleanup #1548

merged 1 commit into from
Sep 5, 2019

Conversation

qndel
Copy link
Member

@qndel qndel commented Sep 5, 2019

bin exact in vanilla and hellfire

@qndel qndel added Binary exact code cleanup Cosmetic enhancement to the code to make it look nicer. hellfire labels Sep 5, 2019
@AJenbo AJenbo mentioned this pull request Sep 5, 2019
@AJenbo AJenbo merged commit 61acfa3 into diasurgical:master Sep 5, 2019
@AJenbo AJenbo deleted the MI_LArrow branch September 5, 2019 13:15
@@ -2606,7 +2606,7 @@ void MI_LArrow(int i)
if (missile[i]._mix != missile[i]._miVar1 || missile[i]._miy != missile[i]._miVar2) {
missile[i]._miVar1 = missile[i]._mix;
missile[i]._miVar2 = missile[i]._miy;
ChangeLight(missile[i]._mlid, missile[i]._mix, missile[i]._miy, 5);
ChangeLight(missile[i]._mlid, missile[i]._miVar1, missile[i]._miVar2, 5);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that it was incorrect in vanilla? Prior to changing the field _mix to _miVar1?

Copy link

Choose a reason for hiding this comment

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

No, it was just poor decompilation due to optimizing. It is assigned to the same variables right above it i.e. missile[i]._miVar1 = missile[i]._mix;. So likely _mix is put in a register and then pushed afterwards for minimum size.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right. This rings a bell somehow. Thanks for explaining it to me (perhaps for the second time, seeing as I have a deja vu feeling).

Copy link
Member

Choose a reason for hiding this comment

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

There have been a few PRs like this one today 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Binary exact code cleanup Cosmetic enhancement to the code to make it look nicer. hellfire
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants