Missing water level checks for portal water

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!

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Missing water level checks for portal water

Re: Missing water level checks for portal water

by Graf Zahl » Tue Oct 26, 2021 2:35 am

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.

Missing water level checks for portal water

by Rachael » Tue Oct 26, 2021 2:27 am

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.
Attachments
portalwatertest.wad
(9.58 KiB) Downloaded 39 times

Top