components/prboom/p_floor.c
//
// EV_DoChange()
//
// Handle pure change types. These change floor texture and sector type
// by trigger or numeric model without moving the floor.
//
// The linedef causing the change and the type of change is passed
// Returns true if any sector changes
//
// jff 3/15/98 added to better support generalized sector types
//
EV_DoChange()
Handle pure change types. These change floor texture and sector type
by trigger or numeric model without moving the floor.

The linedef causing the change and the type of change is passed
Returns true if any sector changes

jff 3/15/98 added to better support generalized sector types
EV_DoChange () Handle pure change types . These change floor texture and sector type by trigger or numeric model without moving the floor . The linedef causing the change and the type of change is passed Returns true if any sector changes jff 3 / 15 / 98 added to better support generalized sector types
int EV_DoChange
( line_t*       line,
  change_e      changetype )
{
  int                   secnum;
  int                   rtn;
  sector_t*             sec;
  sector_t*             secm;
  secnum = -1;
  rtn = 0;
  while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
  {
    sec = &sectors[secnum];
    rtn = 1;
    switch(changetype)
    {
      case trigChangeOnly:
        sec->floorpic = line->frontsector->floorpic;
        sec->special = line->frontsector->special;
        sec->oldspecial = line->frontsector->oldspecial;
        break;
      case numChangeOnly:
        secm = P_FindModelFloorSector(sec->floorheight,secnum);
        if (secm) 
        {
          sec->floorpic = secm->floorpic;
          sec->special = secm->special;
          sec->oldspecial = secm->oldspecial;
        }
        break;
      default:
        break;
    }
  }
  return rtn;
}
int EV_DoChange ( line_t * line , change_e changetype ) { int secnum ; int rtn ; sector_t * sec ; sector_t * secm ; secnum = -1 ; rtn = 0 ; while ( ( secnum = P_FindSectorFromLineTag ( line , secnum ) ) >= 0 ) { sec = & sectors [ secnum ] ; rtn = 1 ; switch ( changetype ) { case trigChangeOnly : sec -> floorpic = line -> frontsector -> floorpic ; sec -> special = line -> frontsector -> special ; sec -> oldspecial = line -> frontsector -> oldspecial ; break ; case numChangeOnly : secm = P_FindModelFloorSector ( sec -> floorheight , secnum ) ; if ( secm ) { sec -> floorpic = secm -> floorpic ; sec -> special = secm -> special ; sec -> oldspecial = secm -> oldspecial ; } break ; default : break ; } } return rtn ; }
EV_DoChange()
Handle pure change types.
EV_DoChange () Handle pure change types .
// change all sectors with the same tag as the linedef // handle trigger or numeric change type // if no model, no change