components/prboom/p_tick.c
//
// P_AddThinker
// Adds a new thinker at the end of the list.
//
P_AddThinker
Adds a new thinker at the end of the list.
P_AddThinker Adds a new thinker at the end of the list .
void P_AddThinker(thinker_t* thinker)
{
  thinkercap.prev->next = thinker;
  thinker->next = &thinkercap;
  thinker->prev = thinkercap.prev;
  thinkercap.prev = thinker;
  thinker->references = 0;    
  thinker->cnext = thinker->cprev = NULL;
  P_UpdateThinker(thinker);
  newthinkerpresent = true;
}
void P_AddThinker ( thinker_t * thinker ) { thinkercap . prev -> next = thinker ; thinker -> next = & thinkercap ; thinker -> prev = thinkercap . prev ; thinkercap . prev = thinker ; thinker -> references = 0 ; thinker -> cnext = thinker -> cprev = NULL ; P_UpdateThinker ( thinker ) ; newthinkerpresent = true ; }
P_AddThinker
Adds a new thinker at the end of the list.
P_AddThinker Adds a new thinker at the end of the list .
// killough 11/98: init reference counter to 0 // killough 8/29/98: set sentinel pointers, and then add to appropriate list