Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4105,6 +4105,10 @@ void ProcessMissiles()
for (i = 0; i < nummissiles; i++) {
dFlags[missile[missileactive[i]]._mix][missile[missileactive[i]]._miy] &= ~BFLAG_MISSILE;
dMissile[missile[missileactive[i]]._mix][missile[missileactive[i]]._miy] = 0;
#ifdef HELLFIRE
if (missile[missileactive[i]]._mix < 0 || missile[missileactive[i]]._mix >= MAXDUNX - 1 || missile[missileactive[i]]._miy < 0 || missile[missileactive[i]]._miy >= MAXDUNY - 1)
missile[missileactive[i]]._miDelFlag = TRUE;
#endif
}

i = 0;
Expand Down Expand Up @@ -4146,7 +4150,11 @@ void ProcessMissiles()

i = 0;
while (i < nummissiles) {
#ifdef HELLFIRE
if (missile[missileactive[i]]._miDelFlag == TRUE) {
#else
if (missile[missileactive[i]]._miDelFlag) {
Copy link
Member

Choose a reason for hiding this comment

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

can you check if != FALSE works for both

Copy link
Member Author

Choose a reason for hiding this comment

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

it doesn't

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if maybe _miDelFlag was changed from BOOL to bool and that's the difference?

Copy link
Member Author

Choose a reason for hiding this comment

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

well, the asm in hellfire says cmp dword ptr [eax+0x697A8C], 0x01

Copy link
Member

Choose a reason for hiding this comment

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

What an ugly and useless refactor :D

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed :P

#endif
DeleteMissile(missileactive[i], i);
i = 0;
} else {
Expand Down