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

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