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

if no surrounding sector exists -32000*FRACUINT is returned
but if compatibility then 0 is the smallest return possible
P_FindHighestCeilingSurrounding () Passed a sector returns the fixed point value of the largest ceiling height in the surrounding sectors not including that passed if no surrounding sector exists - 32000 * FRACUINT is returned but if compatibility then 0 is the smallest return possible
fixed_t P_FindHighestCeilingSurrounding(sector_t* sec)
{
  int             i;
  line_t* check;
  sector_t*       other;
  fixed_t height = 0;
  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_FindHighestCeilingSurrounding ( sector_t * sec ) { int i ; line_t * check ; sector_t * other ; fixed_t height = 0 ; 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_FindHighestCeilingSurrounding()
Passed a sector, returns the fixed point value of the largest
ceiling height in the surrounding sectors, not including that passed
P_FindHighestCeilingSurrounding () Passed a sector returns the fixed point value of the largest ceiling height in the surrounding sectors not including that passed
/* jff 1/26/98 Fix initial value for floor to not act differently
   * in sections of wad that are below 0 units
   * jff 3/12/98 avoid ovf in height calculations */