Missing water level checks for portal water

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Missing water level checks for portal water

Post by Rachael »

Hello! I am working on a project with a few friends and we discovered a pretty major bug with how GZDoom handles waterlevel checks when it concerns portal water.

Our enemy in question is a giant fish that is allowed to float except when too far over the surface of the water - if that happens to him he's supposed to be pushed back down.

That works well with 3D floor water as demonstrated in this example, but it does not work at all well with portal water. In our project we really want to give mappers the option to use either water.

The attached example will show how these waterlevel checks affect the player as well - via a bit of console spam.

In checking p_mobj.cpp - I noticed that there are no portal checks at all in that code. I would fix this myself but this does not at all seem to be a simple fix - the waterlevel checking code here seems to be fairly involved, and may have even been copy-pasted a couple of times, making what should be a simple fix like this a lot more complicated. The only way I will be able to touch this code is if I refactor it, and streamline it through some function checks.
You do not have the required permissions to view the files attached to this post.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Missing water level checks for portal water

Post by Graf Zahl »

There are indeed no portal checks for water. It is assumed that a portal boundary is not a boundary between water and non-water.
Due to the mess involved I skipped that scenario entirely.

Return to “Bugs [GZDoom]”