Skip to content

Fix Mobj Flag Fumblings

Fixes three instances of the wrong mobj->[flags/flags2/eflags] variable being set/checked with the wrong [MF_/MF2_/MFE_] constants.

This fixes the Dragonbomber checking for MF_PAPERCOLLISION instead of MFE_VERTICALFLIP for flying either above or below its target, ghost trail objects getting MF_NOCLIPHEIGHT instead of MF2_OBJECTFLIP if the spawner has MF2_OBJECTFLIP, and Metal Sonic's fume not copying MF2_OBJECTFLIP (which barely matters as it also copies MFE_VERTICALFLIP).

I used these regular expression searches to find these:
(->flags[^2].*(MF2_|MFE_))|(->flags2.*(MF_|MFE_))|(->eflags.*(MF_|MF2_)) (Single-line.)
(->flags[^2][^;{}]*(MF2_|MFE_))|(->flags2[^;{}]*(MF_|MFE_))|(->eflags[^;{}]*(MF_|MF2_)) (Single- and multi-line, didn't wind up necessary.)
This matches all(?) instances of mismatched ->[flags/flags2/eflags] and [MF_/MF2_/MFE_] sets/checks - unfortunately including false positives like mobj->flags & MF_BOSS && mobj->flags2 & MF2_FRET. I went through every match by hand, finding three "true positives".

Note that there may still be cases like x = MF_BOSS; mobj->flags2 = x;, which the above regular expressions don't match.

-

TL;DR: Fixed Dragonbombers not flying "below" their target in reverse gravity

Merge request reports