p_move.c
//
// Adjusts tmfloorz and tmceilingz as lines are contacted.
//
Adjusts tmfloorz and tmceilingz as lines are contacted.
Adjusts tmfloorz and tmceilingz as lines are contacted .
static boolean PIT_CheckLine(line_t *ld)
{
   fixed_t   opentop, openbottom, lowfloor;
   sector_t *front, *back;
   if(ld->sidenum[1] == -1)
      return false; 
   if(!(tmthing->flags & MF_MISSILE))
   {
      if(ld->flags & ML_BLOCKING)
         return false; 
      if(!tmthing->player && (ld->flags & ML_BLOCKMONSTERS))
         return false; 
   }
   front = LD_FRONTSECTOR(ld);
   back  = LD_BACKSECTOR(ld);
   if(front->ceilingheight == front->floorheight ||
      back->ceilingheight == back->floorheight)
   {
      blockline = ld;
      return false; 
   }
   if(front->ceilingheight < back->ceilingheight)
      opentop = front->ceilingheight;
   else
      opentop = back->ceilingheight;
   if(front->floorheight > back->floorheight)
   {
      openbottom = front->floorheight;
      lowfloor   = back->floorheight;
   }
   else
   {
      openbottom = back->floorheight;
      lowfloor   = front->floorheight;
   }
   if(opentop < tmceilingz)
      tmceilingz = opentop;
   if(openbottom > tmfloorz)
      tmfloorz = openbottom;
   if(lowfloor < tmdropoffz)
      tmdropoffz = lowfloor;
   return true;
}
static boolean PIT_CheckLine ( line_t * ld ) { fixed_t opentop , openbottom , lowfloor ; sector_t * front , * back ; if ( ld -> sidenum [ 1 ] == -1 ) return false ; if ( ! ( tmthing -> flags & MF_MISSILE ) ) { if ( ld -> flags & ML_BLOCKING ) return false ; if ( ! tmthing -> player && ( ld -> flags & ML_BLOCKMONSTERS ) ) return false ; } front = LD_FRONTSECTOR ( ld ) ; back = LD_BACKSECTOR ( ld ) ; if ( front -> ceilingheight == front -> floorheight || back -> ceilingheight == back -> floorheight ) { blockline = ld ; return false ; } if ( front -> ceilingheight < back -> ceilingheight ) opentop = front -> ceilingheight ; else opentop = back -> ceilingheight ; if ( front -> floorheight > back -> floorheight ) { openbottom = front -> floorheight ; lowfloor = back -> floorheight ; } else { openbottom = back -> floorheight ; lowfloor = front -> floorheight ; } if ( opentop < tmceilingz ) tmceilingz = opentop ; if ( openbottom > tmfloorz ) tmfloorz = openbottom ; if ( lowfloor < tmdropoffz ) tmdropoffz = lowfloor ; return true ; }
Adjusts tmfloorz and tmceilingz as lines are contacted.
Adjusts tmfloorz and tmceilingz as lines are contacted .
// The moving thing's destination positoin will cross the given line. // If this should not be allowed, return false. // one-sided line // explicitly blocking everything // block monsters only // probably a closed door // adjust floor/ceiling heights