Skip to content

Fixed missing checks in P_TestMobjZ#2827

Merged
madame-rachelle merged 1 commit intoZDoom:masterfrom
Boondorl:FlechetteClipFix
Nov 22, 2024
Merged

Fixed missing checks in P_TestMobjZ#2827
madame-rachelle merged 1 commit intoZDoom:masterfrom
Boondorl:FlechetteClipFix

Conversation

@Boondorl
Copy link
Copy Markdown
Contributor

Fixes #2818, but also fixes a whole slew of other problems. In particular, missiles really did not interact well with this whatsoever. This presents a huge problem because neither Doom nor Strife's missiles made the assumptions Heretic/Hexen's did with their z checking which could cause behavioral clashes between the games. Even worse, many of the genericized features of the Raven games (e.g. bouncing) were not accounted for correctly since the hardcoded nature of those games meant many of those checks were unnecessary. Other problems like rippers went under the radar given their usual reliance on the arguably broken FastMissile class. This PR fixes most of these issues like projectiles with THRUGHOST getting snagged on GHOST monsters vertically.

Adds in missing missile checks and fixes ordering to match P_CheckPosition to give more consistency.
@madame-rachelle
Copy link
Copy Markdown
Collaborator

So while I have no doubt that this will fix a lot of broken things, I also can't help but wonder how much stuff depends on the old (broken) behavior. When things like this get fixed, inevitably there's some niche mod that comes around that needs things back to the way they were (ugh) and then we eventually have to make a compatibility flag for it. It's even worse when that happens to be a more popular mod.

@Boondorl
Copy link
Copy Markdown
Contributor Author

The issue here is that this is actually a product of ZDoom's own creation. If you look at the original Hexen code it doesn't have the special bounce case ZDoom does and standing on top of mobjs only ever applied to players. This means ZDoom's implementation actually introduced bugs to the gameplay that didn't exist in Hexen (e.g. Fighter's flechettes exploding on hidden Stalkers). In fact, the original PIT_CheckOnmobjZ() didn't have a case for checking the missile's owner at all because they never called it. I'm fine with ZDoom remixing the physics to make things more generecized, but that means it needs to do it properly, and this seems more like a case where it got neglected over the decades as P_CheckPosition() continued to get expanded.

Given that this only produced broken behavior, I'm fine with having no compat flag for now and should something break, we can add a ZDoom compat flag to mimic the old broken physics. Frankly, though, I'd rather not support that since this isn't a vanilla issue but a (G)ZDoom one.

@madame-rachelle madame-rachelle merged commit 878c5f0 into ZDoom:master Nov 22, 2024
tiltshiftfocus pushed a commit to tiltshiftfocus/gzdoom that referenced this pull request Apr 22, 2025
Adds in missing missile checks and fixes ordering to match P_CheckPosition to give more consistency.
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.

[BUG] Hexen fighter flechettes explode on other players with sv_noplayerclip 1

2 participants