components/prboom/p_spec.c
//
// P_FindLowestCeilingSurrounding()
//
// Passed a sector, returns the fixed point value of the smallest
// ceiling height in the surrounding sectors, not including that passed
//
// NOTE: if no surrounding sector exists 32000*FRACUINT is returned
//       but if compatibility then INT_MAX is the return
//
P_FindLowestCeilingSurrounding()
Passed a sector, returns the fixed point value of the smallest
ceiling height in the surrounding sectors, not including that passed

if no surrounding sector exists 32000*FRACUINT is returned
but if compatibility then INT_MAX is the return
P_FindLowestCeilingSurrounding () Passed a sector returns the fixed point value of the smallest ceiling height in the surrounding sectors not including that passed if no surrounding sector exists 32000 * FRACUINT is returned but if compatibility then INT_MAX is the return
fixed_t P_FindLowestCeilingSurrounding(sector_t* sec)
{
  int                 i;
  line_t*             check;
  sector_t*           other;
  fixed_t             height = INT_MAX;
  if (!comp[comp_model]) height = 32000*FRACUNIT;
  for (i=0 ;i < sec->linecount ; i++)
  {
    check = sec->lines[i];
    other = getNextSector(check,sec);
    if (!other)
      continue;
    if (other->ceilingheight < height)
      height = other->ceilingheight;
  }
  return height;
}
fixed_t P_FindLowestCeilingSurrounding ( sector_t * sec ) { int i ; line_t * check ; sector_t * other ; fixed_t height = INT_MAX ; if ( ! comp [ comp_model ] ) height = 32000 * FRACUNIT ; for ( i = 0 ; i < sec -> linecount ; i ++ ) { check = sec -> lines [ i ] ; other = getNextSector ( check , sec ) ; if ( ! other ) continue ; if ( other -> ceilingheight < height ) height = other -> ceilingheight ; } return height ; }
P_FindLowestCeilingSurrounding()
Passed a sector, returns the fixed point value of the smallest
ceiling height in the surrounding sectors, not including that passed
P_FindLowestCeilingSurrounding () Passed a sector returns the fixed point value of the smallest ceiling height in the surrounding sectors not including that passed
/* jff 3/12/98 avoid ovf in height calculations */