components/prboom/p_map.c
// P_DelSecnode() deletes a sector node from the list of
// sectors this object appears in. Returns a pointer to the next node
// on the linked list, or NULL.
P_DelSecnode() deletes a sector node from the list of
sectors this object appears in. Returns a pointer to the next node
on the linked list, or NULL.
P_DelSecnode () deletes a sector node from the list of sectors this object appears in . Returns a pointer to the next node on the linked list or NULL .
msecnode_t* P_DelSecnode(msecnode_t* node)
  {
  msecnode_t* tp;  
  msecnode_t* tn;  
  msecnode_t* sp;  
  msecnode_t* sn;  
  if (node)
    {
    tp = node->m_tprev;
    tn = node->m_tnext;
    if (tp)
      tp->m_tnext = tn;
    if (tn)
      tn->m_tprev = tp;
    sp = node->m_sprev;
    sn = node->m_snext;
    if (sp)
      sp->m_snext = sn;
    else
      node->m_sector->touching_thinglist = sn;
    if (sn)
      sn->m_sprev = sp;
    P_PutSecnode(node);
    return(tn);
    }
  return(NULL);
  }
msecnode_t * P_DelSecnode ( msecnode_t * node ) { msecnode_t * tp ; msecnode_t * tn ; msecnode_t * sp ; msecnode_t * sn ; if ( node ) { tp = node -> m_tprev ; tn = node -> m_tnext ; if ( tp ) tp -> m_tnext = tn ; if ( tn ) tn -> m_tprev = tp ; sp = node -> m_sprev ; sn = node -> m_snext ; if ( sp ) sp -> m_snext = sn ; else node -> m_sector -> touching_thinglist = sn ; if ( sn ) sn -> m_sprev = sp ; P_PutSecnode ( node ) ; return ( tn ) ; } return ( NULL ) ; }
P_DelSecnode() deletes a sector node from the list of
sectors this object appears in.
P_DelSecnode () deletes a sector node from the list of sectors this object appears in .
// prev node on thing thread // next node on thing thread // prev node on sector thread // next node on sector thread // Unlink from the Thing thread. The Thing thread begins at // sector_list and not from mobj_t->touching_sectorlist. // Unlink from the sector thread. This thread begins at // sector_t->touching_thinglist. // Return this node to the freelist