Player pitch affects XY movement in 3D shallow water

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Player pitch affects XY movement in 3D shallow water

Post by Nash »

Tested in gc7d28b0

When you're walking in shallow (3D floor) water, the player's pitch is taken into account for the XY movement. Which means the more you are looking up or down, the slower the XY movement. At straight 90 degrees up or down, the player won't move in XY directions at all.

Test WAD: just step into the shallow water area and look up or down and see how the XY movement is affected by the player's pitch.
Attachments
ShallowWater.zip
(1.07 KiB) Downloaded 18 times
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Player pitch affects XY movement in 3D shallow water

Post by _mental_ »

I looks like it always works like that thanks to this line. The corresponding C++ code did the same thing long ago before scriptification.
Probably this was not noticed because of limited view pitch in software renderer.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Player pitch affects XY movement in 3D shallow water

Post by Nash »

In my opinion, the player should continue to move as if on solid ground (but still affected by the friction of being underwater) as long as he isn't submerged deep enough into the water. How deep is enough, one might ask? I'm not sure. Maybe a full body's height?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Player pitch affects XY movement in 3D shallow water

Post by Graf Zahl »

To be honest, I have absolutely no idea whatsoever what this code is trying to do. The entire check looks utterly nonsensical.
But I also have no idea whatsoever what might break if this changes so I'm just leaving it as it is.

This really needs input from Randi. I do not think there's any other person who might shed some light upon it.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Player pitch affects XY movement in 3D shallow water

Post by _mental_ »

Those calculations make sense for underwater and no gravity movement. But for shallow water (when waterlevel is 1) they are pretty weird indeed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Player pitch affects XY movement in 3D shallow water

Post by Graf Zahl »

Correct, but keep in mind that the engine makes no distinction between an actor just diving in and one standing in shallow water.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Player pitch affects XY movement in 3D shallow water

Post by Nash »

Understood. At some point I will need to create my player pawn's class overrides for my standalone game, so I'll have to end up fixing this myself... along with some other built-in annoyances like how holding down the Jump key actually makes you elevate faster than the +moveup key while underwater (essentially making +jump a cheat key to get out of water faster)...
Post Reply

Return to “Closed Bugs [GZDoom]”