components/prboom/p_map.c
// phares 3/14/98
//
// PIT_GetSectors
// Locates all the sectors the object is in by looking at the lines that
// cross through it. You have already decided that the object is allowed
// at this location, so don't bother with checking impassable or
// blocking lines.
phares 3/14/98
PIT_GetSectors
Locates all the sectors the object is in by looking at the lines that
cross through it. You have already decided that the object is allowed
at this location, so don't bother with checking impassable or
blocking lines.
phares 3 / 14 / 98 PIT_GetSectors Locates all the sectors the object is in by looking at the lines that cross through it . You have already decided that the object is allowed at this location so don ' t bother with checking impassable or blocking lines .
boolean PIT_GetSectors(line_t* ld)
  {
  if (tmbbox[BOXRIGHT]  <= ld->bbox[BOXLEFT]   ||
      tmbbox[BOXLEFT]   >= ld->bbox[BOXRIGHT]  ||
      tmbbox[BOXTOP]    <= ld->bbox[BOXBOTTOM] ||
      tmbbox[BOXBOTTOM] >= ld->bbox[BOXTOP])
    return true;
  if (P_BoxOnLineSide(tmbbox, ld) != -1)
    return true;
  sector_list = P_AddSecnode(ld->frontsector,tmthing,sector_list);
  if (ld->backsector && ld->backsector != ld->frontsector)
    sector_list = P_AddSecnode(ld->backsector, tmthing, sector_list);
  return true;
  }
boolean PIT_GetSectors ( line_t * ld ) { if ( tmbbox [ BOXRIGHT ] <= ld -> bbox [ BOXLEFT ] || tmbbox [ BOXLEFT ] >= ld -> bbox [ BOXRIGHT ] || tmbbox [ BOXTOP ] <= ld -> bbox [ BOXBOTTOM ] || tmbbox [ BOXBOTTOM ] >= ld -> bbox [ BOXTOP ] ) return true ; if ( P_BoxOnLineSide ( tmbbox , ld ) != -1 ) return true ; sector_list = P_AddSecnode ( ld -> frontsector , tmthing , sector_list ) ; if ( ld -> backsector && ld -> backsector != ld -> frontsector ) sector_list = P_AddSecnode ( ld -> backsector , tmthing , sector_list ) ; return true ; }
phares 3/14/98
PIT_GetSectors
Locates all the sectors the object is in by looking at the lines that
cross through it.
phares 3 / 14 / 98 PIT_GetSectors Locates all the sectors the object is in by looking at the lines that cross through it .
// This line crosses through the object. // Collect the sector(s) from the line and add to the // sector_list you're examining. If the Thing ends up being // allowed to move to this position, then the sector_list // will be attached to the Thing's mobj_t at touching_sectorlist. /* Don't assume all lines are 2-sided, since some Things
   * like MT_TFOG are allowed regardless of whether their radius takes
   * them beyond an impassable linedef.
   *
   * killough 3/27/98, 4/4/98:
   * Use sidedefs instead of 2s flag to determine two-sidedness.
   * killough 8/1/98: avoid duplicate if same sector on both sides
   * cph - DEMOSYNC? */