summaryrefslogtreecommitdiff
path: root/src/strife/p_tick.c
diff options
context:
space:
mode:
authorJames Haley2011-02-06 17:38:54 +0000
committerJames Haley2011-02-06 17:38:54 +0000
commit17333436188f63319625b007489c7b70029bfaba (patch)
treeabccc36961eb03e46828c5a38f20eb501519f0f8 /src/strife/p_tick.c
parentab144aa9d30a97f0c3a2d049d624c868aaba3af7 (diff)
downloadchocolate-doom-17333436188f63319625b007489c7b70029bfaba.tar.gz
chocolate-doom-17333436188f63319625b007489c7b70029bfaba.tar.bz2
chocolate-doom-17333436188f63319625b007489c7b70029bfaba.zip
Numerous fixes/adjustments: removed bodyque, restored "is turbo" (found
it in there after all), removed some dead code in p_dialog, added a 'default: break;' case in EV_VerticalDoor, initialize player_t::allegiance in P_SetupLevel, minor changes to EV_Teleport, 2nd-pass verification for p_tick, and big fixes in p_user.c including noclip cheat, viewz clipping against floor, air control thrust amount, and missing/incorrect else's. Subversion-branch: /branches/strife-branch Subversion-revision: 2250
Diffstat (limited to 'src/strife/p_tick.c')
-rw-r--r--src/strife/p_tick.c51
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++;
}