Hi,
whenever you step onto a slope or step off it, you can recognize a "bump" the player walks, I think it has to do with the bounding box.. bla. However, this is kinda weird if you copy slopes.
Just take this level and walk the tunnel slope up and down slowly... you will recognize the bumps. Can this be fixed?
Slope bumps
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Why don't you post this in 'Bugs' where it belongs?
But you are right. Something should be done about this. If exactly the same slope is on both sides of the line these 'bumps' should be avoided.
Wouldn't it be sufficient if in the case that if the slope on both sides of a line is exactly the same as the one the actor being checked is standing on not the openbottom returned by P_LineOpening is used but the floorz of the actor?
EDIT: I just tested this. It seems to help a bit but the problem doesn't go away completely. There's apparently something else that's also affecting this. Anyway, here's what I did:
After this block in PIT_CheckLine
I added the following check:
But you are right. Something should be done about this. If exactly the same slope is on both sides of the line these 'bumps' should be avoided.
Wouldn't it be sufficient if in the case that if the slope on both sides of a line is exactly the same as the one the actor being checked is standing on not the openbottom returned by P_LineOpening is used but the floorz of the actor?
EDIT: I just tested this. It seems to help a bit but the problem doesn't go away completely. There's apparently something else that's also affecting this. Anyway, here's what I did:
After this block in PIT_CheckLine
Code: Select all
if (r <= 0)
{
P_LineOpening (ld, sx=ld->v1->x, sy=ld->v1->y, tmx, tmy);
}
else if (r >= (1<<24))
{
P_LineOpening (ld, sx=ld->v2->x, sy=ld->v2->y, tmthing->x, tmthing->y);
}
else
{
P_LineOpening (ld, sx=ld->v1->x + MulScale24 (r, ld->dx),
sy=ld->v1->y + MulScale24 (r, ld->dy), tmx, tmy);
}
Code: Select all
if (ld->frontsector->floorplane==ld->backsector->floorplane &&
ld->frontsector->floorplane==tmthing->sector->floorplane)
{
openbottom=INT_MIN;
}
Last edited by Graf Zahl on Sun Nov 16, 2003 5:58 am, edited 3 times in total.
Some time ago (March 2002) I mentioned to Randy that if you sloped a tunnel that was just tall enough for the player (56 units tall) sometimes the player would not be able to step on and off the slopes as if there was not enough room for him to fit, even if the appearance of the slope was such that there should be no problem. Randy explained why...
Randy wrote:To determine floor and sector heights of all the sectors you are in, those sector's heights are compared at your center. If the sector doesn't actually pass through the center of your body, the collision detector will pretend it does. You might have noticed that when you walk up a slope onto an adjoining sector you sometimes step down even though the two sectors meet nicely; that's why. It was the easiest way to support slopes with the existing code.
- Kappes Buur
-
- Posts: 4171
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49225
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Kappes Buur wrote:.
Would this have something to do with using the 'Copy Floor Plane' thing,
instead of setting each line to slope the plane individually?
.
Internally it doesn't matter how a slope is created. The slope things don't exist anymore after the level has been set up. All that's left is the slope and there is no way to tell how it was done.
The problem is with the collision detection code which checks the lines and sets an incorrect floor height in case the player is standing on a slope boundary. In the one very special case here where all sectors have the same slope something can be done about it but in any other case this can become a major headache to fix it - if it is fixable at all.