void P_RemoveThinker(thinker_t *thinker) { R_StopInterpolationIfNeeded(thinker); thinker->function = P_RemoveThinkerDelayed; P_UpdateThinker(thinker); }
void P_RemoveThinker(thinker_t *thinker) { #ifndef __LIBRETRO__ R_StopInterpolationIfNeeded(thinker); #endif thinker->function = P_RemoveThinkerDelayed; P_UpdateThinker(thinker); }
void P_AddThinker(thinker_t* thinker) { thinkercap.prev->next = thinker; thinker->next = &thinkercap; thinker->prev = thinkercap.prev; thinkercap.prev = thinker; thinker->references = 0; // killough 11/98: init reference counter to 0 // killough 8/29/98: set sentinel pointers, and then add to appropriate list thinker->cnext = thinker->cprev = thinker; P_UpdateThinker(thinker); }
// // P_RemoveThinker // Deallocation is lazy -- it will not actually be freed // until its thinking turn comes up. // // killough 4/25/98: // // Instead of marking the function with -1 value cast to a function pointer, // set the function to P_RemoveThinkerDelayed(), so that later, it will be // removed automatically as part of the thinker process. // void P_RemoveThinker(thinker_t *thinker) { thinker->function = P_RemoveThinkerDelayed; P_UpdateThinker(thinker); }