[Fixed] Sliding bug

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Sliding bug

Postby Graf Zahl » Mon Dec 22, 2003 9:38 am

Sliding against the first or second side of a blocking two-sided linedef produces completely different results:

Sliding against the first side is like sliding against a one-sided wall.
Sliding against the second side is like the awful behavior of the original Doom.exe

Checking the code in PTR_SlideTraverse I discovered that even with a blocking two-sided linedef the side is still checked and the proper handling only activated when on the first side.


That's the code as it is:

Code: Select allExpand view
   if ( !(li->flags & ML_TWOSIDED) || (li->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING)) )
   {
      if (P_PointOnLineSide (slidemo->x, slidemo->y, li))
      {
         // don't hit the back side
         return true;            
      }
      goto isblocking;
   }


and that as it should be

Code: Select allExpand view
   if ( !(li->flags & ML_TWOSIDED))
   {
      if (P_PointOnLineSide (slidemo->x, slidemo->y, li))
      {
         // don't hit the back side
         return true;            
      }
      goto isblocking;
   }
    if (li->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING)) goto isblocking;
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randi » Fri Jan 02, 2004 8:35 pm

Thanks. Fixed.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests