diff options
Diffstat (limited to 'src/strife/p_tick.c')
-rw-r--r-- | src/strife/p_tick.c | 51 |
1 files changed, 30 insertions, 21 deletions
diff --git a/src/strife/p_tick.c b/src/strife/p_tick.c index cca2e2c4..4a7ead62 100644 --- a/src/strife/p_tick.c +++ b/src/strife/p_tick.c @@ -32,7 +32,7 @@ #include "doomstat.h" -int leveltime; +int leveltime; // // THINKERS @@ -45,12 +45,14 @@ int leveltime; // Both the head and tail of the thinker list. -thinker_t thinkercap; +thinker_t thinkercap; // // P_InitThinkers // +// [STRIFE] Verified unmodified +// void P_InitThinkers (void) { thinkercap.prev = thinkercap.next = &thinkercap; @@ -63,6 +65,8 @@ void P_InitThinkers (void) // P_AddThinker // Adds a new thinker at the end of the list. // +// [STRIFE] Verified unmodified +// void P_AddThinker (thinker_t* thinker) { thinkercap.prev->next = thinker; @@ -78,6 +82,8 @@ void P_AddThinker (thinker_t* thinker) // Deallocation is lazy -- it will not actually be freed // until its thinking turn comes up. // +// [STRIFE] Verified unmodified +// void P_RemoveThinker (thinker_t* thinker) { // FIXME: NOP. @@ -97,43 +103,46 @@ void P_AllocateThinker (thinker_t* thinker) // // P_RunThinkers // +// [STRIFE] Verified unmodified +// void P_RunThinkers (void) { - thinker_t* currentthinker; + thinker_t* currentthinker; currentthinker = thinkercap.next; while (currentthinker != &thinkercap) { - if ( currentthinker->function.acv == (actionf_v)(-1) ) - { - // time to remove it - currentthinker->next->prev = currentthinker->prev; - currentthinker->prev->next = currentthinker->next; - Z_Free (currentthinker); - } - else - { - if (currentthinker->function.acp1) - currentthinker->function.acp1 (currentthinker); - } - currentthinker = currentthinker->next; + if ( currentthinker->function.acv == (actionf_v)(-1) ) + { + // time to remove it + currentthinker->next->prev = currentthinker->prev; + currentthinker->prev->next = currentthinker->next; + Z_Free (currentthinker); + } + else + { + if (currentthinker->function.acp1) + currentthinker->function.acp1 (currentthinker); + } + currentthinker = currentthinker->next; } } // // P_Ticker // - +// [STRIFE] Menu pause behavior modified +// void P_Ticker (void) { - int i; + int i; // run the tic if (paused) return; - + // pause if in menu and at least one tic has been run - // haleyjd 09/08/10: menuactive -> menupause + // haleyjd 09/08/10 [STRIFE]: menuactive -> menupause if (!netgame && menupause && !demoplayback @@ -152,5 +161,5 @@ void P_Ticker (void) P_RespawnSpecials (); // for par times - leveltime++; + leveltime++; } |