Page 1 of 1

Slope bumps

PostPosted: Sun Nov 16, 2003 5:12 am
by Hirogen2
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?

PostPosted: Sun Nov 16, 2003 5:25 am
by Graf Zahl
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

Code: Select allExpand view
      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);
      }



I added the following check:

Code: Select allExpand view
      if (ld->frontsector->floorplane==ld->backsector->floorplane &&
         ld->frontsector->floorplane==tmthing->sector->floorplane)
      {
         openbottom=INT_MIN;
      }

PostPosted: Sun Nov 16, 2003 5:34 am
by Enjay
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.

PostPosted: Sun Nov 16, 2003 10:53 am
by Hirogen2
Why don't you post this in 'Bugs' where it belongs?

Otherwise it could have been moved to General :D

PostPosted: Sun Nov 16, 2003 11:00 am
by Graf Zahl
Why? To me this sounds more like bug (or at least some undesirable game behavior) than a general discussion topic, don't you think?

PostPosted: Sun Nov 16, 2003 12:20 pm
by Kappes Buur
.
Would this have something to do with using the 'Copy Floor Plane' thing,
instead of setting each line to slope the plane individually?
.

PostPosted: Sun Nov 16, 2003 1:32 pm
by Hirogen2
No the bump occurs on any sector (not subsector hah!) boundary, be it normally-sloped or plane-copied.

PostPosted: Sun Nov 16, 2003 3:12 pm
by Graf Zahl
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.

PostPosted: Sun Nov 16, 2003 7:46 pm
by HotWax
Hirogen2 wrote:
Why don't you post this in 'Bugs' where it belongs?

Otherwise it could have been moved to General :D


Best to post bugs (or what you honestly believe to be bugs) in the bugs forum and let Randy decide what to do with it.