shithub: choc

Download patch

ref: aecddc60790bac4b44ce0e5790ec644da657571b
parent: 0973932861fd8f8851a9a6b7e451fed894844cb4
author: James Haley <haleyjd@hotmail.com>
date: Thu Feb 3 20:37:51 EST 2011

Finished second pass through p_mobj.c - module should now be finalized
except for explicitly tagged FIXME/TODO items in P_SpawnMapThing.

Subversion-branch: /branches/strife-branch
Subversion-revision: 2245

--- a/src/strife/p_mobj.c
+++ b/src/strife/p_mobj.c
@@ -117,6 +117,11 @@
 //
 // P_XYMovement
 //
+// [STRIFE] Modifications for:
+// * No SKULLFLY logic (replaced by BOUNCE flag)
+// * Missiles can activate G1/GR line types
+// * Player walking logic
+//
 #define STOPSPEED       0x1000
 #define FRICTION        0xe800
 
@@ -278,6 +283,12 @@
 //
 // P_ZMovement
 //
+// [STRIFE] Modifications for:
+// * 3D Object Clipping
+// * Different momz handling
+// * No SKULLFLY logic (replaced with BOUNCE)
+// * Missiles don't hit sky flats
+//
 void P_ZMovement (mobj_t* mo)
 {
     fixed_t	dist;
@@ -320,7 +331,7 @@
             if (delta<0 && dist < -(delta*3) )
                 mo->z -= FLOATSPEED;
             else if (delta>0 && dist < (delta*3) )
-                mo->z += FLOATSPEED;			
+                mo->z += FLOATSPEED;
         }
 
     }
@@ -353,6 +364,7 @@
         // So we need to check that this is either retail or commercial
         // (but not doom2)
 
+        // [STRIFE] not applicable
         //int correct_lost_soul_bounce = gameversion >= exe_ultimate;
 
         if (/*correct_lost_soul_bounce &&*/ mo->flags & MF_BOUNCE)
@@ -371,7 +383,7 @@
         if (mo->momz < 0)
         {
             if (mo->player
-                && mo->momz < -GRAVITY*8)	
+                && mo->momz < -GRAVITY*8)
             {
                 // Squat down.
                 // Decrease viewheight for a moment
@@ -401,8 +413,10 @@
         //
 
         // villsa [STRIFE] unused
-        /*if (!correct_lost_soul_bounce && mo->flags & MF_SKULLFLY)
-            mo->momz = -mo->momz;*/
+        /*
+        if (!correct_lost_soul_bounce && mo->flags & MF_SKULLFLY)
+            mo->momz = -mo->momz;
+        */
 
         // villsa [STRIFE] also check for MF_BOUNCE
         if ( (mo->flags & MF_MISSILE)
@@ -698,14 +712,13 @@
 //
 // P_RemoveMobj
 //
+// [STRIFE] Modifications for item respawn timing
+//
 mapthing_t  itemrespawnque[ITEMQUESIZE];
 int         itemrespawntime[ITEMQUESIZE];
 int         iquehead;
 int         iquetail;
 
-//
-// [STRIFE] Modifications to item respawn timing
-//
 void P_RemoveMobj (mobj_t* mobj)
 {
     // villsa [STRIFE] removed invuln/invis. sphere exceptions
@@ -803,6 +816,10 @@
 // Most of the player structure stays unchanged
 //  between levels.
 //
+// [STRIFE] Modifications for:
+// * stonecold cheat, -workparm
+// * default inventory/questflags
+//
 void P_SpawnPlayer(mapthing_t* mthing)
 {
     player_t*   p;
@@ -888,6 +905,14 @@
 // The fields of the mapthing should
 // already be in host byte order.
 //
+// [STRIFE] Modifications for:
+// * No Lost Souls, item count
+// * New mapthing_t flag bits
+//
+// STRIFE-FIXME/STRIFE-TODO:
+// * 8-player support
+// * Restore I_Error for missing mapthings (8-player support is prerequisite)
+//
 void P_SpawnMapThing (mapthing_t* mthing)
 {
     int         i;
@@ -1012,6 +1037,10 @@
 //
 // P_SpawnPuff
 //
+// [STRIFE] Modifications for:
+// * No spawn tics randomization
+// * Player melee behavior
+//
 extern fixed_t attackrange;
 
 void
@@ -1057,6 +1086,10 @@
 //
 // P_SpawnBlood
 // 
+// [STRIFE] Modifications for:
+// * No spawn tics randomization
+// * Different damage ranges for state setting
+//
 void
 P_SpawnBlood
 ( fixed_t	x,
@@ -1095,6 +1128,9 @@
 // Moves the missile forward a bit
 //  and possibly explodes it right there.
 //
+// [STRIFE] Modifications for:
+// * No spawn tics randomization
+//
 void P_CheckMissileSpawn (mobj_t* th)
 {
     // villsa [STRIFE] unused
@@ -1140,6 +1176,8 @@
 //
 // P_SpawnMissile
 //
+// [STRIFE] Added MVIS inaccuracy
+//
 mobj_t*
 P_SpawnMissile
 ( mobj_t*	source,
@@ -1309,10 +1347,10 @@
 
 //
 // P_SpawnMortar
+//
 // villsa [STRIFE] new function
 // Spawn a high-arcing ballistic projectile
 //
-
 mobj_t* P_SpawnMortar(mobj_t *source, mobjtype_t type)
 {
     mobj_t* th;
@@ -1326,13 +1364,14 @@
     th->angle = an;
     an >>= ANGLETOFINESHIFT;
 
-    slope = P_AimLineAttack(source, source->angle, 1024*FRACUNIT);
-
+    // haleyjd 20110203: corrected order of function calls
     th->momx = FixedMul(th->info->speed, finecosine[an]);
     th->momy = FixedMul(th->info->speed, finesine[an]);
-    th->momz = FixedMul(th->info->speed, slope);
 
     P_CheckMissileSpawn(th);
+    
+    slope = P_AimLineAttack(source, source->angle, 1024*FRACUNIT);
+    th->momz = FixedMul(th->info->speed, slope);
 
     return th;
 }
--- a/src/strife/st_stuff.c
+++ b/src/strife/st_stuff.c
@@ -331,7 +331,7 @@
 cheatseq_t cheat_midas      = CHEAT("donnytrump", 0);   // [STRIFE]: new cheat
 cheatseq_t cheat_lego       = CHEAT("lego", 0);         // [STRIFE]: new cheat
 
-cheatseq_t	cheat_powerup[7] = // STRIFE-TODO
+cheatseq_t cheat_powerup[7] = // STRIFE-TODO
 {
     CHEAT("idbeholdv", 0),
     CHEAT("idbeholds", 0),