Skip to content
Snippets Groups Projects

Fix Mobj Flag Fumblings

Merged Zwip-Zwap Zapony requested to merge Zwip-Zwap_Zapony/SRB2:fix-mobj-flag-fumblings into next

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading