3D slopes can be shot through sometimes

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
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

3D slopes can be shot through sometimes

Post by GFD »

It seems that if the lower end of the ceiling of a 3D slope is exactly the same height as the floor of the destination sector, or the upper end of the floor of a 3D slope is exactly the same height as the ceiling of the destination sector, hitscans can go through the 3D slope from some positions.

Attached is a test map with four 3D slopes. The two in front of the player meet the aforementioned requirements. The area behind the player (grey floor) is the same as the area in front of the player, except that the destination sectors for those 3D slopes have their floors and ceilings lowered and raised respectively by 8 units, so those 3D slopes cannot be shot through. If you're in the area directly "in front" of where an affected 3D slope's plane "meets" the surrounding planes, you can shoot through the whole 3D slope. If you're not in this area, only one of two parts of the 3D slope can be shot through; the dividing line between these two parts is determined by the player's position. If you are "behind" the line where the slope's plane "meets" the surrounding planes, the 3D slope cannot be shot through at all.

This behaviour is also present in 2.8.1 and 2.7.1, except only some hitscans will pass through.
Attachments
slopehitscantest.wad
(14.38 KiB) Downloaded 25 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D slopes can be shot through sometimes

Post by Graf Zahl »

So what's the problem here?

Actually quite simple: Your setup violates the #1 rule of 3D floors:

There may be no intersections between 3D floors or between 3D floors and the actual floor or ceiling. These 3D floors all go below the actual sector floor, and as a result all 4 of them exhibit problems, some more, some less. What happens is actually quite simple: At the spot where the hitscan enters the sector it is detected that the 3D floor is below the actual floor and thus ignored for all following calculations.

This rule is the #1 rule because the entire engine is written under the assumption that there are no intersecting planes. This assumption helps keeping the code manageable. And with slopes, as you can see, violating this rule causes glitchy behavior.

What I can fix is the case where they meet at exactly the same height, but that'd cure only a small part of the problems in here
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: 3D slopes can be shot through sometimes

Post by GFD »

Yes, the test map here does violate this, but it was just thrown together as I tried to deduce the underlying problem. I'm not actually trying to use intersecting planes or 3D floors outside their destination sector in what I'm working on, so it's fine if those don't work. The instance where I discovered this behaviour was where the 3D slope had both the floor and ceiling at one end at the same height as the floor/ceiling of the destination sector. Such a configuration would technically be valid, right?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D slopes can be shot through sometimes

Post by Graf Zahl »

I think so - but in order to test I need something valid. I cannot test with this because it's impossible which parts break due to improper 3D floor use and which due to some oversight.
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: 3D slopes can be shot through sometimes

Post by GFD »

Alright, here's a modified test map using some valid configurations. The left 3D slope can only be shot through from the front, the right one only from the back, and the middle one from both sides.
Attachments
slopehitscantest2.wad
(11.9 KiB) Downloaded 28 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49231
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: 3D slopes can be shot through sometimes

Post by Graf Zahl »

fixed
User avatar
GFD
Posts: 347
Joined: Mon May 31, 2010 7:42 pm
Preferred Pronouns: He/Him
Location: Canada
Contact:

Re: 3D slopes can be shot through sometimes

Post by GFD »

Yay! Thanks very much for your hard work lately.
Post Reply

Return to “Closed Bugs [GZDoom]”