shithub: choc

Download patch

ref: 17333436188f63319625b007489c7b70029bfaba
parent: ab144aa9d30a97f0c3a2d049d624c868aaba3af7
author: James Haley <haleyjd@hotmail.com>
date: Sun Feb 6 12:38:54 EST 2011

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

--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -471,14 +471,14 @@
 void D_DoomLoop (void)
 {
     if (demorecording)
-	G_BeginRecording ();
-		
+        G_BeginRecording ();
+
     if (M_CheckParm ("-debugfile"))
     {
-	char    filename[20];
-	sprintf (filename,"debug%i.txt",consoleplayer);
-	printf ("debug output to: %s\n",filename);
-	debugfile = fopen (filename,"w");
+        char    filename[20];
+        sprintf (filename,"debug%i.txt",consoleplayer);
+        printf ("debug output to: %s\n",filename);
+        debugfile = fopen (filename,"w");
     }
 
     TryRunTics();
@@ -500,30 +500,30 @@
 
     while (1)
     {
-	// frame syncronous IO operations
-	I_StartFrame ();                
-	
-	// process one or more tics
-	if (singletics)
-	{
-	    I_StartTic ();
-	    D_ProcessEvents ();
-	    G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]);
-	    if (advancedemo)
-		D_DoAdvanceDemo ();
-	    M_Ticker ();
-	    G_Ticker ();
-	    gametic++;
-	    maketic++;
-	}
-	else
-	{
-	    TryRunTics (); // will run at least one tic
-	}
+        // frame syncronous IO operations
+        I_StartFrame ();
 
-	S_UpdateSounds (players[consoleplayer].mo);// move positional sounds
+        // process one or more tics
+        if (singletics)
+        {
+            I_StartTic ();
+            D_ProcessEvents ();
+            G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]);
+            if (advancedemo)
+                D_DoAdvanceDemo ();
+            M_Ticker ();
+            G_Ticker ();
+            gametic++;
+            maketic++;
+        }
+        else
+        {
+            TryRunTics (); // will run at least one tic
+        }
 
-	// Update display, next frame, with current state.
+        S_UpdateSounds (players[consoleplayer].mo);// move positional sounds
+
+        // Update display, next frame, with current state.
         if (screenvisible)
             D_Display ();
     }
@@ -548,7 +548,7 @@
 void D_PageTicker (void)
 {
     if (--pagetic < 0)
-	D_AdvanceDemo ();
+        D_AdvanceDemo ();
 }
 
 
@@ -580,6 +580,8 @@
 // This cycles through the demo sequences.
 // FIXME - version dependend demo numbers?
 //
+// [STRIFE] Modified for the opening slideshow and the exit screen
+//
 void D_DoAdvanceDemo (void)
 {
     players[consoleplayer].playerstate = PST_LIVE;  // not reborn
@@ -596,7 +598,7 @@
         return;
     case -4: // show exit screen
         menuactive = false;
-        pagetic = (3*TICRATE);
+        pagetic = 3*TICRATE;
         gamestate = GS_DEMOSCREEN;
         pagename = DEH_String("PANEL7");
         S_StartMusic(mus_fast);
@@ -606,13 +608,13 @@
             demosequence = -5; // exit
         return;
     case -3: // show Velocity logo for demo version
-        pagetic = (6*TICRATE);
+        pagetic = 6*TICRATE;
         gamestate = GS_DEMOSCREEN;
         pagename = DEH_String("vellogo");
         demosequence = -5; // exit
         return;
     case -2: // title screen
-        pagetic = (6*TICRATE);
+        pagetic = 6*TICRATE;
         gamestate = GS_DEMOSCREEN;
         pagename = DEH_String("TITLEPIC");
         S_StartMusic(mus_logo);
@@ -626,13 +628,13 @@
         wipegamestate = -1;
         break;
     case 0: // Rogue logo
-        pagetic = (4*TICRATE);
+        pagetic = 4*TICRATE;
         gamestate = GS_DEMOSCREEN;
         pagename = DEH_String("RGELOGO");
         wipegamestate = -1;
         break;
     case 1:
-        pagetic = (7*TICRATE);            // The comet struck our planet without
+        pagetic = 7*TICRATE;              // The comet struck our planet without
         gamestate = GS_DEMOSCREEN;        // warning.We lost our paradise in a 
         pagename = DEH_String("PANEL1");  // single, violent stroke.
         I_StartVoice(DEH_String("pro1")); 
@@ -639,37 +641,37 @@
         S_StartMusic(mus_intro);
         break;
     case 2:
-        pagetic = (9*TICRATE);            // The impact released a virus which 
+        pagetic = 9*TICRATE;              // The impact released a virus which 
         gamestate = GS_DEMOSCREEN;        // swept through the land and killed 
         pagename = DEH_String("PANEL2");  // millions. They turned out to be 
         I_StartVoice(DEH_String("pro2")); // the lucky ones...
         break;
     case 3:
-        pagetic = (12*TICRATE);           // For those that did not die became 
+        pagetic = 12*TICRATE;             // For those that did not die became 
         gamestate = GS_DEMOSCREEN;        // mutations of humanity. Some became
         pagename = DEH_String("PANEL3");  // fanatics who heard the voice of a
         I_StartVoice(DEH_String("pro3")); // malignant God in their heads, and 
         break;                            // called themselves the Order.
     case 4:
-        pagetic = (11*TICRATE);           // Those of us who were deaf to this
+        pagetic = 11*TICRATE;             // Those of us who were deaf to this
         pagename = DEH_String("PANEL4");  // voice suffer horribly and are 
         gamestate = GS_DEMOSCREEN;        // forced to serve these ruthless
         I_StartVoice(DEH_String("pro4")); // psychotics, who wield weapons more
         break;                            // powerful than anything we can muster.
     case 5:
-        pagetic = (10*TICRATE);           // They destroy our women and children,
+        pagetic = 10*TICRATE;             // They destroy our women and children,
         gamestate = GS_DEMOSCREEN;        // so that we must hide them underground,
         pagename = DEH_String("PANEL5");  // and live like animals in constant
         I_StartVoice(DEH_String("pro5")); // fear for our lives.
         break;
     case 6:                               // But there are whispers of discontent.
-        pagetic = (16*TICRATE);           // If we organize, can we defeat our
+        pagetic = 16*TICRATE;             // If we organize, can we defeat our
         gamestate = GS_DEMOSCREEN;        // masters? Weapons are being stolen,
         pagename = DEH_String("PANEL6");  // soldiers are being trained. A 
         I_StartVoice(DEH_String("pro6")); // Movement is born! Born of lifelong 
         break;                            // STRIFE!
     case 7: // titlepic again - unused...
-        pagetic = (9*TICRATE);
+        pagetic = 9*TICRATE;
         gamestate = GS_DEMOSCREEN;
         pagename = DEH_String("TITLEPIC");
         wipegamestate = -1;
@@ -676,11 +678,11 @@
         break;
     case 8: // demo
         //ClearTmp();  STRIFE-TODO
-        pagetic = (9*TICRATE);
+        pagetic = 9*TICRATE;
         G_DeferedPlayDemo(DEH_String("demo1"));
         break;
     case 9: // velocity logo? - unused...
-        pagetic = (6*TICRATE);
+        pagetic = 6*TICRATE;
         gamestate = GS_DEMOSCREEN;
         pagename = DEH_String("vellogo");
         wipegamestate = -1;
@@ -687,7 +689,7 @@
         break;
     case 10: // credits
         gamestate = GS_DEMOSCREEN;
-        pagetic = (12*TICRATE);
+        pagetic = 12*TICRATE;
         pagename = DEH_String("CREDIT");
         wipegamestate = -1;
         break;
--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -61,7 +61,7 @@
 //
 
 ticcmd_t        netcmds[MAXPLAYERS][BACKUPTICS];
-int         	nettics[MAXPLAYERS];
+int             nettics[MAXPLAYERS];
 
 int             maketic;
 
@@ -253,7 +253,7 @@
     for (i=0; i<MAXPLAYERS; i++)
     {
         playeringame[i] = false;
-       	nettics[i] = 0;
+        nettics[i] = 0;
     }
 
     playeringame[0] = true;
--- a/src/strife/doomstat.h
+++ b/src/strife/doomstat.h
@@ -175,7 +175,7 @@
 // Statistics on a given map, for intermission.
 //
 extern  int	totalkills;
-extern	int	totalitems;
+//extern	int	totalitems; [STRIFE] unused
 extern	int	totalsecret;
 
 // Timer, for scores.
@@ -279,7 +279,7 @@
 // debug flag to cancel adaptiveness
 extern  boolean         singletics;	
 
-extern  int             bodyqueslot;
+//extern  int             bodyqueslot; [STRIFE] unused
 
 
 
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -132,14 +132,13 @@
 boolean         playeringame[MAXPLAYERS]; 
 player_t        players[MAXPLAYERS]; 
 
-// [STRIFE] unused
-//boolean         turbodetected[MAXPLAYERS];
+boolean         turbodetected[MAXPLAYERS];
  
 int             consoleplayer;          // player taking events and displaying 
 int             displayplayer;          // view being displayed 
 int             gametic; 
 int             levelstarttic;          // gametic at level start 
-int             totalkills, totalitems, totalsecret;    // for intermission 
+int             totalkills, /*totalitems,*/ totalsecret;    // for intermission 
  
 char            demoname[32]; 
 boolean         demorecording; 
@@ -242,7 +241,7 @@
 #define	BODYQUESIZE	32
 
 mobj_t*		bodyque[BODYQUESIZE]; 
-int		bodyqueslot; 
+//int       bodyqueslot; [STRIFE] unused
  
 int             vanilla_savegame_limit = 1;
 int             vanilla_demo_limit = 1;
@@ -775,7 +774,7 @@
 
     for (i=0 ; i<MAXPLAYERS ; i++) 
     { 
-        //turbodetected[i] = false; [STRIFE] unused
+        turbodetected[i] = false;
 
         // haleyjd 20110204 [STRIFE]: PST_REBORN if players[i].health <= 0
         if (playeringame[i] && (players[i].playerstate == PST_DEAD || players[i].health <= 0))
@@ -868,54 +867,54 @@
 { 
     // allow spy mode changes even during the demo
     if (gamestate == GS_LEVEL && ev->type == ev_keydown 
-     && ev->data1 == key_spy && (singledemo || !deathmatch) )
+        && ev->data1 == key_spy && (singledemo || !deathmatch) )
     {
-	// spy mode 
-	do 
-	{ 
-	    displayplayer++; 
-	    if (displayplayer == MAXPLAYERS) 
-		displayplayer = 0; 
-	} while (!playeringame[displayplayer] && displayplayer != consoleplayer); 
-	return true; 
+        // spy mode 
+        do 
+        { 
+            displayplayer++; 
+            if (displayplayer == MAXPLAYERS) 
+                displayplayer = 0; 
+        } while (!playeringame[displayplayer] && displayplayer != consoleplayer); 
+        return true; 
     }
-    
+
     // any other key pops up menu if in demos
     if (gameaction == ga_nothing && !singledemo && 
-	(demoplayback || gamestate == GS_DEMOSCREEN) 
-	) 
+        (demoplayback || gamestate == GS_DEMOSCREEN) 
+        ) 
     { 
-	if (ev->type == ev_keydown ||  
-	    (ev->type == ev_mouse && ev->data1) || 
-	    (ev->type == ev_joystick && ev->data1) ) 
-	{ 
-	    M_StartControlPanel (); 
-	    return true; 
-	} 
-	return false; 
+        if (ev->type == ev_keydown ||  
+            (ev->type == ev_mouse && ev->data1) || 
+            (ev->type == ev_joystick && ev->data1) ) 
+        { 
+            M_StartControlPanel (); 
+            return true; 
+        } 
+        return false; 
     } 
 
     if (gamestate == GS_LEVEL) 
     { 
 #if 0 
-	if (devparm && ev->type == ev_keydown && ev->data1 == ';') 
-	{ 
-	    G_DeathMatchSpawnPlayer (0); 
-	    return true; 
-	} 
+        if (devparm && ev->type == ev_keydown && ev->data1 == ';') 
+        { 
+            G_DeathMatchSpawnPlayer (0); 
+            return true; 
+        } 
 #endif 
-	if (HU_Responder (ev)) 
-	    return true;	// chat ate the event 
-	if (ST_Responder (ev)) 
-	    return true;	// status window ate it 
-	if (AM_Responder (ev)) 
-	    return true;	// automap ate it 
+        if (HU_Responder (ev)) 
+            return true;	// chat ate the event 
+        if (ST_Responder (ev)) 
+            return true;	// status window ate it 
+        if (AM_Responder (ev)) 
+            return true;	// automap ate it 
     } 
-	 
+
     if (gamestate == GS_FINALE) 
     { 
-	if (F_Responder (ev)) 
-	    return true;	// finale ate the event 
+        if (F_Responder (ev)) 
+            return true;	// finale ate the event 
     } 
 
     if (testcontrols && ev->type == ev_mouse)
@@ -942,39 +941,39 @@
 
     switch (ev->type) 
     { 
-      case ev_keydown: 
-	if (ev->data1 == key_pause) 
-	{ 
-	    sendpause = true; 
-	}
+    case ev_keydown: 
+        if (ev->data1 == key_pause) 
+        { 
+            sendpause = true; 
+        }
         else if (ev->data1 <NUMKEYS) 
         {
-	    gamekeydown[ev->data1] = true; 
+            gamekeydown[ev->data1] = true; 
         }
 
-	return true;    // eat key down events 
- 
-      case ev_keyup: 
-	if (ev->data1 <NUMKEYS) 
-	    gamekeydown[ev->data1] = false; 
-	return false;   // always let key up events filter down 
-		 
-      case ev_mouse: 
+        return true;    // eat key down events 
+
+    case ev_keyup: 
+        if (ev->data1 <NUMKEYS) 
+            gamekeydown[ev->data1] = false; 
+        return false;   // always let key up events filter down 
+
+    case ev_mouse: 
         SetMouseButtons(ev->data1);
-	mousex = ev->data2*(mouseSensitivity+5)/10; 
-	mousey = ev->data3*(mouseSensitivity+5)/10; 
-	return true;    // eat events 
- 
-      case ev_joystick: 
+        mousex = ev->data2*(mouseSensitivity+5)/10; 
+        mousey = ev->data3*(mouseSensitivity+5)/10; 
+        return true;    // eat events 
+
+    case ev_joystick: 
         SetJoyButtons(ev->data1);
-	joyxmove = ev->data2; 
-	joyymove = ev->data3; 
-	return true;    // eat events 
- 
-      default: 
-	break; 
+        joyxmove = ev->data2; 
+        joyymove = ev->data3; 
+        return true;    // eat events 
+
+    default: 
+        break; 
     } 
- 
+
     return false; 
 } 
 
@@ -1062,10 +1061,7 @@
             // over the past 4 seconds.  offset the checking period
             // for each player so messages are not displayed at the
             // same time.
-            //
-            // haleyjd 20110204 [STRIFE] unused
 
-            /*
             if (cmd->forwardmove > TURBOTHRESHOLD)
             {
                 turbodetected[i] = true;
@@ -1081,7 +1077,6 @@
                 players[consoleplayer].message = turbomessage;
                 turbodetected[i] = false;
             }
-            */
 
             if (netgame && !netdemo && !(gametic%ticdup) ) 
             { 
@@ -1236,7 +1231,7 @@
     int         allegiance;
 
     killcount = players[player].killcount;
-    allegiance = players[player].allegiance;
+    allegiance = players[player].allegiance; // [STRIFE]
 
     memcpy(frags,players[player].frags,sizeof(frags));
 
@@ -1261,10 +1256,11 @@
     for(i = 0; i < NUMAMMO; i++) 
         p->maxammo[i] = maxammo[i]; 
 
+    // [STRIFE] clear inventory
     for(i = 0; i < 32; i++)
         p->inventory[i].type = NUMMOBJTYPES;
 
-    // villsa [STRIFE]
+    // villsa [STRIFE]: Default objective
     strncpy(mission_objective, DEH_String("Find help"), OBJECTIVE_LEN);
 }
 
--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -2,7 +2,6 @@
 //-----------------------------------------------------------------------------
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
-// Copyright(C) 1996 Rogue Entertainment / Velocity, Inc.
 // Copyright(C) 2010 James Haley, Samuel Villareal
 //
 // This program is free software; you can redistribute it and/or
@@ -138,7 +137,7 @@
 
 static dialogstateset_t dialogstatesets[] =
 {
-    { MT_PLAYER,       S_NULL,     S_NULL,   S_NULL    },
+    { MT_PLAYER,       S_NULL,    S_NULL,    S_NULL    },
     { MT_SHOPKEEPER_W, S_MRGT_00, S_MRYS_00, S_MRNO_00 },
     { MT_SHOPKEEPER_B, S_MRGT_00, S_MRYS_00, S_MRNO_00 },
     { MT_SHOPKEEPER_A, S_MRGT_00, S_MRYS_00, S_MRNO_00 },
@@ -558,7 +557,6 @@
 // [STRIFE] New function
 // haleyjd 09/03/10: Find the set of special dialog states (greetings, yes, no)
 // for a particular thing type.
-// STRIFE-TODO: Or is it a conversation ID?
 //
 static dialogstateset_t *P_DialogGetStates(mobjtype_t type)
 {
@@ -984,75 +982,6 @@
         S_StartSound(NULL, sound);
 
     return true;
-
-    // check for other types
-    /*
-    switch(type)
-    {
-    // severed hand
-
-    // 300 gold
-
-    // ammo refill (at training)
-
-    // health refill (at front HQ)
-
-    // alarm
-
-    // door special 1
-
-    // door special 2
-
-    // door special 3
-
-    // door special 4
-
-    // stamina upgrade
-
-    // slideshow
-
-    default:
-        // check for sprites if no specific type is found
-        switch(sprnum)
-        {
-            // bullets
-
-            // box of bullets
-
-            // missile
-
-            // box of missiles
-
-            // battery
-
-
-
-            // backpack
-
-            // communicator
-
-
-            // rifle
-
-            // flame thrower
-
-            // missile launcher
-
-            // mauler
-
-
-            // misc item
-        default:
-            if(!P_GiveInventoryItem(player, sprnum, type))
-                return false;
-            break;
-        }
-        break;
-    }
-
-    S_StartSound(player->mo, sfx_itemup);
-    return true;
-    */
 }
 
 //
@@ -1478,4 +1407,7 @@
     DEH_snprintf(dialoglastmsgbuffer, sizeof(dialoglastmsgbuffer),
                  "%d) %s", i + 1, byetext);
 }
+
+// EOF
+
 
--- a/src/strife/p_doors.c
+++ b/src/strife/p_doors.c
@@ -554,7 +554,7 @@
     vldoor_t*   door;
     int         side;
 
-    side = 0;	// only front sides can be used
+    side = 0;   // only front sides can be used
 
     //	Check for locks
     player = thing->player;
@@ -732,11 +732,6 @@
     sec = sides[ line->sidenum[side^1]] .sector;
     secnum = sec-sectors;
 
-
-    // STRIFE-TODO: retriggering logic was modified, and has a serious bug in that
-    // some linetypes are allowed to fall through and start multiple thinkers on a
-    // single sector - this must be carefully replicated
-
     if (sec->specialdata)
     {
         door = sec->specialdata;
@@ -764,7 +759,7 @@
         case 213:       // villsa
         case 232:       // villsa
             if(door->direction == -1)
-                door->direction = 1;	// go back up
+                door->direction = 1;    // go back up
             else
             {
                 if (!thing->player)
@@ -776,7 +771,7 @@
 
                 if (door->thinker.function.acp1 == (actionf_p1) T_VerticalDoor)
                 {
-                    door->direction = -1;	// start going down immediately
+                    door->direction = -1;   // start going down immediately
                 }
                 else if (door->thinker.function.acp1 == (actionf_p1) T_PlatRaise)
                 {
@@ -806,6 +801,8 @@
                 }
             }
             return;
+        default:
+            break;
         }
     }
 
@@ -830,7 +827,7 @@
         S_StartSound(&sec->soundorg, sfx_bdopn);
         break;
 
-    default:	// NORMAL DOOR SOUND
+    default:    // NORMAL DOOR SOUND
         S_StartSound(&sec->soundorg, door->opensound);
         break;
     }
@@ -884,8 +881,8 @@
 //
 void P_SpawnDoorCloseIn30 (sector_t* sec)
 {
-    vldoor_t*	door;
-	
+    vldoor_t*   door;
+
     door = Z_Malloc ( sizeof(*door), PU_LEVSPEC, 0);
 
     P_AddThinker (&door->thinker);
--- a/src/strife/p_pspr.c
+++ b/src/strife/p_pspr.c
@@ -59,12 +59,12 @@
 //
 void
 P_SetPsprite
-( player_t*	player,
-  int		position,
-  statenum_t	stnum ) 
+( player_t*     player,
+  int           position,
+  statenum_t    stnum )
 {
-    pspdef_t*	psp;
-    state_t*	state;
+    pspdef_t*   psp;
+    state_t*    state;
 
     psp = &player->psprites[position];
 
@@ -74,7 +74,7 @@
         {
             // object removed itself
             psp->state = NULL;
-            break;	
+            break;
         }
 
         state = &states[stnum];
@@ -116,7 +116,7 @@
 //
 void P_BringUpWeapon (player_t* player)
 {
-    statenum_t	newstate;
+    statenum_t  newstate;
 
     if (player->pendingweapon == wp_nochange)
         player->pendingweapon = player->readyweapon;
@@ -207,7 +207,7 @@
     // Now set appropriate weapon overlay.
     P_SetPsprite(player, ps_weapon, weaponinfo[player->readyweapon].downstate);
 
-    return false;	
+    return false;
 }
 
 
@@ -255,9 +255,9 @@
 // or after previous attack/fire sequence.
 //
 void A_WeaponReady( player_t* player, pspdef_t* psp)
-{	
-    statenum_t	newstate;
-    int		angle;
+{
+    statenum_t  newstate;
+    int         angle;
     
     // get out of attack state
     if (player->mo->state == &states[S_PLAY_05] || // 292
@@ -282,7 +282,7 @@
         //  (pending weapon should allready be validated)
         newstate = weaponinfo[player->readyweapon].downstate;
         P_SetPsprite (player, ps_weapon, newstate);
-        return;	
+        return;
     }
     
     // check for fire
@@ -289,7 +289,6 @@
     //  the missile launcher and torpedo do not auto fire
     if (player->cmd.buttons & BT_ATTACK)
     {
-
         if ( !player->attackdown
             || (player->readyweapon != wp_missile
             && player->readyweapon != wp_torpedo)) // villsa [STRIFE] replace bfg with torpedo
@@ -382,7 +381,7 @@
     {
         // Player is dead, so keep the weapon off screen.
         P_SetPsprite (player,  ps_weapon, S_NULL);
-        return;	
+        return;
     }
 
     player->readyweapon = player->pendingweapon; 
--- a/src/strife/p_setup.c
+++ b/src/strife/p_setup.c
@@ -751,20 +751,23 @@
 //
 void
 P_SetupLevel
-( int		map,
-  int		playermask,
-  skill_t	skill)
+( int       map,
+  int       playermask,
+  skill_t   skill)
 {
-    int		i;
-    char	lumpname[9];
-    int		lumpnum;
-	
-    totalkills = totalitems = totalsecret = wminfo.maxfrags = 0;
-    wminfo.partime = 180;
+    int     i;
+    char    lumpname[9];
+    int     lumpnum;
+
+    // haleyjd 20110205 [STRIFE]: removed totalitems and wminfo
+    totalkills =  totalsecret = 0;
+
     for (i=0 ; i<MAXPLAYERS ; i++)
     {
-        // haleyjd 08/30/10: [STRIFE] Removed secretcount, itemcount
-	players[i].killcount = 0;
+        // haleyjd 20100830: [STRIFE] Removed secretcount, itemcount
+        //         20110205: [STRIFE] Initialize players.allegiance
+        players[i].allegiance = i;
+        players[i].killcount = 0;
     }
 
     // Initial height of PointOfView
@@ -772,18 +775,18 @@
     players[consoleplayer].viewz = 1; 
 
     // Make sure all sounds are stopped before Z_FreeTags.
-    S_Start ();			
+    S_Start ();
 
     
 #if 0 // UNUSED
     if (debugfile)
     {
-	Z_FreeTags (PU_LEVEL, INT_MAX);
-	Z_FileDumpHeap (debugfile);
+        Z_FreeTags (PU_LEVEL, INT_MAX);
+        Z_FileDumpHeap (debugfile);
     }
     else
 #endif
-	Z_FreeTags (PU_LEVEL, PU_PURGELEVEL-1);
+    Z_FreeTags (PU_LEVEL, PU_PURGELEVEL-1);
 
 
     // UNUSED W_Profile ();
@@ -813,7 +816,7 @@
     P_GroupLines ();
     P_LoadReject (lumpnum+ML_REJECT);
 
-    bodyqueslot = 0;
+    //bodyqueslot = 0; [STRIFE] unused
     deathmatch_p = deathmatchstarts;
     P_LoadThings (lumpnum+ML_THINGS);
     
@@ -820,30 +823,29 @@
     // if deathmatch, randomly spawn the active players
     if (deathmatch)
     {
-	for (i=0 ; i<MAXPLAYERS ; i++)
-	    if (playeringame[i])
-	    {
-		players[i].mo = NULL;
-		G_DeathMatchSpawnPlayer (i);
-	    }
-			
+        for (i=0 ; i<MAXPLAYERS ; i++)
+            if (playeringame[i])
+            {
+                players[i].mo = NULL;
+                G_DeathMatchSpawnPlayer (i);
+            }
+
     }
 
     // clear special respawning que
-    iquehead = iquetail = 0;		
-	
+    iquehead = iquetail = 0;
+
     // set up world state
     P_SpawnSpecials ();
-	
+
     // build subsector connect matrix
-    //	UNUSED P_ConnectSubsectors ();
+    // UNUSED P_ConnectSubsectors ();
 
     // preload graphics
     if (precache)
-	R_PrecacheLevel ();
+        R_PrecacheLevel ();
 
     //printf ("free memory: 0x%x\n", Z_FreeMemory());
-
 }
 
 
--- a/src/strife/p_telept.c
+++ b/src/strife/p_telept.c
@@ -47,7 +47,8 @@
 // TELEPORTATION
 //
 // haleyjd 09/22/10: [STRIFE] Modified to take a flags parameter to control
-// silent teleportation.
+// silent teleportation. Rogue also removed the check for missiles, and the 
+// z-set was replaced with one in P_TeleportMove.
 //
 int
 EV_Teleport
@@ -67,9 +68,10 @@
     fixed_t     oldy;
     fixed_t     oldz;
 
+    // haleyjd 20110205 [STRIFE]: this is not checked here
     // don't teleport missiles
-    if (thing->flags & MF_MISSILE)
-        return 0;
+    //if (thing->flags & MF_MISSILE)
+    //    return 0;
 
     // Don't teleport if hit back of line,
     //  so you can get out of teleporter.
@@ -76,7 +78,6 @@
     if (side == 1)
         return 0;
 
-
     tag = line->tag;
     for (i = 0; i < numsectors; i++)
     {
@@ -89,18 +90,18 @@
             {
                 // not a mobj
                 if (thinker->function.acp1 != (actionf_p1)P_MobjThinker)
-                    continue;	
+                    continue;
 
                 m = (mobj_t *)thinker;
 
                 // not a teleportman
                 if (m->type != MT_TELEPORTMAN )
-                    continue;		
+                    continue;
 
                 sector = m->subsector->sector;
                 // wrong sector
                 if (sector-sectors != i )
-                    continue;	
+                    continue;
 
                 oldx = thing->x;
                 oldy = thing->y;
@@ -114,9 +115,13 @@
                 //
                 // Note that although chex.exe is based on Final Doom,
                 // it does not have this quirk.
-
+                //
+                // haleyjd 20110205 [STRIFE] This code is *not* present,
+                // because of a z-set which Rogue added to P_TeleportMove.
+                /*
                 if (gameversion < exe_final || gameversion == exe_chex)
                     thing->z = thing->floorz;
+                */
 
                 if (thing->player)
                     thing->player->viewz = thing->z+thing->player->viewheight;
@@ -142,12 +147,12 @@
 
                 // don't move for a bit
                 if (thing->player)
-                    thing->reactiontime = 18;	
+                    thing->reactiontime = 18;
 
                 thing->angle = m->angle;
                 thing->momx = thing->momy = thing->momz = 0;
                 return 1;
-            }	
+            }
         }
     }
     return 0;
--- 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 @@
 
 
 // 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 @@
 // 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 @@
 // 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,26 +103,28 @@
 //
 // 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;
     }
 }
 
@@ -123,17 +131,18 @@
 //
 // 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 @@
     P_RespawnSpecials ();
 
     // for par times
-    leveltime++;	
+    leveltime++;
 }
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -71,6 +71,8 @@
 // P_Thrust
 // Moves the given origin along a given angle.
 //
+// [STRIFE] Verified unmodified
+//
 void
 P_Thrust
 ( player_t*	player,
@@ -90,10 +92,12 @@
 // P_CalcHeight
 // Calculate the walking / running height adjustment
 //
+// [STRIFE] Some odd adjustments, and terrain view height adjustment
+//
 void P_CalcHeight (player_t* player) 
 {
-    int		angle;
-    fixed_t	bob;
+    int     angle;
+    fixed_t bob;
     
     // Regular movement bobbing
     // (needs to be calculated for gun swing
@@ -102,62 +106,69 @@
     // Note: a LUT allows for effects
     //  like a ramp with low health.
     player->bob =
-	FixedMul (player->mo->momx, player->mo->momx)
-	+ FixedMul (player->mo->momy,player->mo->momy);
-    
+        FixedMul (player->mo->momx, player->mo->momx)
+        + FixedMul (player->mo->momy,player->mo->momy);
+
     player->bob >>= 2;
 
     if (player->bob>MAXBOB)
-	player->bob = MAXBOB;
+        player->bob = MAXBOB;
 
-    if ((player->cheats & CF_NOMOMENTUM) || !onground)
+    // haleyjd 20110205 [STRIFE]: No CF_NOMOMENTUM check, and Rogue also removed
+    // the dead code inside.
+    if (!onground)
     {
-	player->viewz = player->mo->z + VIEWHEIGHT;
+        /*
+        player->viewz = player->mo->z + VIEWHEIGHT;
 
-	if (player->viewz > player->mo->ceilingz-4*FRACUNIT)
-	    player->viewz = player->mo->ceilingz-4*FRACUNIT;
+        if (player->viewz > player->mo->ceilingz-4*FRACUNIT)
+            player->viewz = player->mo->ceilingz-4*FRACUNIT;
+        */
 
-	player->viewz = player->mo->z + player->viewheight;
-	return;
+        player->viewz = player->mo->z + player->viewheight;
+        return;
     }
-		
+
     angle = (FINEANGLES/20*leveltime)&FINEMASK;
     bob = FixedMul ( player->bob/2, finesine[angle]);
 
-    
     // move viewheight
     if (player->playerstate == PST_LIVE)
     {
-	player->viewheight += player->deltaviewheight;
+        player->viewheight += player->deltaviewheight;
 
-	if (player->viewheight > VIEWHEIGHT)
-	{
-	    player->viewheight = VIEWHEIGHT;
-	    player->deltaviewheight = 0;
-	}
+        if (player->viewheight > VIEWHEIGHT)
+        {
+            player->viewheight = VIEWHEIGHT;
+            player->deltaviewheight = 0;
+        }
 
-	if (player->viewheight < VIEWHEIGHT/2)
-	{
-	    player->viewheight = VIEWHEIGHT/2;
-	    if (player->deltaviewheight <= 0)
-		player->deltaviewheight = 1;
-	}
-	
-	if (player->deltaviewheight)	
-	{
-	    player->deltaviewheight += FRACUNIT/4;
-	    if (!player->deltaviewheight)
-		player->deltaviewheight = 1;
-	}
+        if (player->viewheight < VIEWHEIGHT/2)
+        {
+            player->viewheight = VIEWHEIGHT/2;
+            if (player->deltaviewheight <= 0)
+                player->deltaviewheight = 1;
+        }
+
+        if (player->deltaviewheight)
+        {
+            player->deltaviewheight += FRACUNIT/4;
+            if (!player->deltaviewheight)
+                player->deltaviewheight = 1;
+        }
     }
     player->viewz = player->mo->z + player->viewheight + bob;
 
-    // villsa [STRIFE] TODO - verify
+    // villsa [STRIFE] account for terrain lowering the view
     if(player->mo->flags & MF_FEETCLIPPED)
-        player->viewz -= (13*FRACUNIT);
+        player->viewz -= 13*FRACUNIT;
 
     if (player->viewz > player->mo->ceilingz-4*FRACUNIT)
-	player->viewz = player->mo->ceilingz-4*FRACUNIT;
+        player->viewz = player->mo->ceilingz-4*FRACUNIT;
+
+    // haleyjd [STRIFE]: added a floorz clip here
+    if (player->viewz < player->mo->floorz)
+        player->viewz = player->mo->floorz;
 }
 
 
@@ -165,12 +176,14 @@
 //
 // P_MovePlayer
 //
+// [STRIFE] Adjustments to allow air control, jumping, and up/down look.
+//
 void P_MovePlayer (player_t* player)
 {
-    ticcmd_t*		cmd;
-	
+    ticcmd_t*      cmd;
+
     cmd = &player->cmd;
-	
+
     player->mo->angle += (cmd->angleturn<<16);
 
     // Do not let the player control movement
@@ -178,10 +191,11 @@
     onground = (player->mo->z <= player->mo->floorz);
 
     // villsa [STRIFE] allows player to climb over things by jumping
+    // haleyjd 20110205: air control thrust should be 256, not cmd->forwardmove
     if(!onground)
     {
         if(cmd->forwardmove)
-            P_Thrust (player, player->mo->angle, cmd->forwardmove);
+            P_Thrust (player, player->mo->angle, 256);
     }
     else
     {
@@ -189,21 +203,23 @@
         if (cmd->buttons2 & BT2_JUMP)
         {
             if(!player->deltaviewheight)
-                player->mo->momz += (8*FRACUNIT);
+                player->mo->momz += 8*FRACUNIT;
         }
-	
-        if (cmd->forwardmove && onground)
-	    P_Thrust (player, player->mo->angle, cmd->forwardmove*2048);
-    
-        if (cmd->sidemove && onground)
-	    P_Thrust (player, player->mo->angle-ANG90, cmd->sidemove*2048);
+
+        // haleyjd 20110205 [STRIFE] Either Rogue or Watcom removed the
+        // redundant "onground" checks from these if's.
+        if (cmd->forwardmove)
+            P_Thrust (player, player->mo->angle, cmd->forwardmove*2048);
+
+        if (cmd->sidemove)
+            P_Thrust (player, player->mo->angle-ANG90, cmd->sidemove*2048);
     }
 
-    // villsa [STRIFE] TODO - verify
+    // villsa [STRIFE] player walking state set
     if ( (cmd->forwardmove || cmd->sidemove) 
-	 && player->mo->state == &states[S_PLAY_00] )
+        && player->mo->state == &states[S_PLAY_00] )
     {
-	P_SetMobjState (player->mo, S_PLAY_01);
+        P_SetMobjState (player->mo, S_PLAY_01);
     }
 
     // villsa [STRIFE] centerview button
@@ -249,7 +265,7 @@
         }
     }
 
-}	
+}
 
 
 
@@ -258,7 +274,9 @@
 // Fall on your face when dying.
 // Decrease POV height to floor height.
 //
-#define ANG5   	(ANG90/18)
+// [STRIFE] Modifications for up/down look.
+//
+#define ANG5    (ANG90/18)
 
 void P_DeathThink(player_t* player)
 {
@@ -281,9 +299,9 @@
     if(player->attacker && player->attacker != player->mo)
     {
         angle = R_PointToAngle2 (player->mo->x,
-            player->mo->y,
-            player->attacker->x,
-            player->attacker->y);
+                                 player->mo->y,
+                                 player->attacker->x,
+                                 player->attacker->y);
 
         delta = angle - player->mo->angle;
 
@@ -317,18 +335,36 @@
 //
 // P_PlayerThink
 //
+// [STRIFE] Massive changes/additions:
+// * NOCLIP hack removed
+// * P_DeathThink moved up
+// * Inventory use/dropping
+// * Strife weapons logic
+// * Dialog
+// * Strife powerups and nukage behavior
+// * Fire Death/Sigil Shock
+//
 void P_PlayerThink (player_t* player)
 {
-    ticcmd_t*		cmd;
-    weapontype_t	newweapon;
+    ticcmd_t*       cmd;
+    weapontype_t    newweapon;
 
+    // villsa [STRIFE] unused code (see ST_Responder)
+    /*
     // fixme: do this in the cheat code
-    // villsa [STRIFE] TODO - verify if unused
     if (player->cheats & CF_NOCLIP)
         player->mo->flags |= MF_NOCLIP;
     else
         player->mo->flags &= ~MF_NOCLIP;
+    */
 
+    // haleyjd 20110205 [STRIFE]: P_DeathThink moved up
+    if (player->playerstate == PST_DEAD)
+    {
+        P_DeathThink (player);
+        return;
+    }
+
     // chain saw run forward
     cmd = &player->cmd;
     if (player->mo->flags & MF_JUSTATTACKED)
@@ -339,13 +375,6 @@
         player->mo->flags &= ~MF_JUSTATTACKED;
     }
 
-
-    if (player->playerstate == PST_DEAD)
-    {
-        P_DeathThink (player);
-        return;
-    }
-
     // Move around.
     // Reactiontime is used to prevent movement
     //  for a bit after a teleport.
@@ -369,9 +398,10 @@
             else if(cmd->buttons2 & BT2_INVUSE)
                 P_UseInventoryItem(player, cmd->inventory);
             else if(cmd->buttons2 & BT2_INVDROP)
-                P_DropInventoryItem(player, cmd->inventory);
-            else
             {
+                P_DropInventoryItem(player, cmd->inventory);
+
+                // haleyjd 20110205: removed incorrect "else" here
                 // villsa [STRIFE]
                 if(workparm)
                 {
@@ -390,7 +420,6 @@
                     }
                 }
             }
-
         }
 
         player->inventorydown = true;
@@ -402,7 +431,7 @@
 
     // A special event has no other buttons.
     if(cmd->buttons & BT_SPECIAL)
-        cmd->buttons = 0;			
+        cmd->buttons = 0;
 
     if(cmd->buttons & BT_CHANGE)
     {
@@ -491,7 +520,7 @@
 
     // Strength counts up to diminish fade.
     if (player->powers[pw_strength])
-        player->powers[pw_strength]++;	
+        player->powers[pw_strength]++;
 
     // villsa [STRIFE] targeter powerup
     if(player->powers[pw_targeter])
@@ -500,21 +529,20 @@
         if(player->powers[pw_targeter] == 1)
         {
             P_SetPsprite(player, ps_targcenter, S_NULL);
-            P_SetPsprite(player, ps_targleft, S_NULL);
-            P_SetPsprite(player, ps_targright, S_NULL);
+            P_SetPsprite(player, ps_targleft,   S_NULL);
+            P_SetPsprite(player, ps_targright,  S_NULL);
         }
-        else if(player->powers[pw_targeter] - 1 < 175)
+        else if(player->powers[pw_targeter] - 1 < 5*TICRATE)
         {
             if(player->powers[pw_targeter] & 32)
             {
                 P_SetPsprite(player, ps_targright, S_NULL);
-                P_SetPsprite(player, ps_targleft, S_TRGT_01);   // 11
+                P_SetPsprite(player, ps_targleft,  S_TRGT_01);   // 11
             }
-
-            if(player->powers[pw_targeter] & 16)
+            else if(player->powers[pw_targeter] & 16) // haleyjd 20110205: missing else
             {
                 P_SetPsprite(player, ps_targright, S_TRGT_02);  // 12
-                P_SetPsprite(player, ps_targleft, S_NULL);
+                P_SetPsprite(player, ps_targleft,  S_NULL);
             }
         }
     }
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -651,15 +651,21 @@
     }
     else if (cht_CheckCheat(&cheat_noclip, ev->data2))
     {
-        // [STRIFE] Verified unmodified, except no idspispopd shit:
+        // [STRIFE] Removed idspispopd, added NOCLIP flag setting/removal
         // Noclip cheat - "ELVIS" (hah-hah :P )
 
         plyr->cheats ^= CF_NOCLIP;
 
         if (plyr->cheats & CF_NOCLIP)
+        {
             plyr->message = DEH_String(STSTR_NCON);
+            plyr->mo->flags |= MF_NOCLIP;
+        }
         else
+        {
             plyr->message = DEH_String(STSTR_NCOFF);
+            plyr->mo->flags &= ~MF_NOCLIP;
+        }
     }
     
     // villsa [STRIFE]