shithub: choc

Download patch

ref: aedeaac6b7f27f5400bcae7f391c457ebad4da59
parent: 6bb2e8481d33ecd2d489c01fba2940c2c315a995
author: James Haley <[email protected]>
date: Mon Oct 4 02:33:10 EDT 2010

Strife changed lowerAndCrush ceiling actions so that they actually do
crushing damage, and lower fully to the floor rather than 8 above. The
speed of fast crushers was also increased by double. Added code to
PIT_RadiusAttack to deny any radius damage to spectral entities and
Inquisitors.

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

--- a/src/strife/p_ceilng.c
+++ b/src/strife/p_ceilng.c
@@ -165,78 +165,93 @@
 // EV_DoCeiling
 // Move a ceiling up/down and all around!
 //
+// haleyjd 10/04/10: [STRIFE] Changes:
+// * Fast crushers were made 2x as fast.
+// * lowerAndCrush was apparently "fixed" to actually crush, and was also
+//   altered to lower all the way to the floor rather than remain 8 above.
 int
 EV_DoCeiling
-( line_t*	line,
-  ceiling_e	type )
+( line_t*       line,
+  ceiling_e     type )
 {
-    int		secnum;
-    int		rtn;
-    sector_t*	sec;
-    ceiling_t*	ceiling;
-	
+    int         secnum;
+    int         rtn;
+    sector_t*   sec;
+    ceiling_t*  ceiling;
+
     secnum = -1;
     rtn = 0;
-    
+
     //	Reactivate in-stasis ceilings...for certain types.
     switch(type)
     {
-      case fastCrushAndRaise:
-      case silentCrushAndRaise:
-      case crushAndRaise:
-	P_ActivateInStasisCeiling(line);
-      default:
-	break;
+    case fastCrushAndRaise:
+    case silentCrushAndRaise:
+    case crushAndRaise:
+        P_ActivateInStasisCeiling(line);
+    default:
+        break;
     }
-	
+
     while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
     {
-	sec = &sectors[secnum];
-	if (sec->specialdata)
-	    continue;
-	
-	// new door thinker
-	rtn = 1;
-	ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVSPEC, 0);
-	P_AddThinker (&ceiling->thinker);
-	sec->specialdata = ceiling;
-	ceiling->thinker.function.acp1 = (actionf_p1)T_MoveCeiling;
-	ceiling->sector = sec;
-	ceiling->crush = false;
-	
-	switch(type)
-	{
-	  case fastCrushAndRaise:
-	    ceiling->crush = true;
-	    ceiling->topheight = sec->ceilingheight;
-	    ceiling->bottomheight = sec->floorheight + (8*FRACUNIT);
-	    ceiling->direction = -1;
-	    ceiling->speed = CEILSPEED * 2;
-	    break;
+        sec = &sectors[secnum];
+        if (sec->specialdata)
+            continue;
 
-	  case silentCrushAndRaise:
-	  case crushAndRaise:
-	    ceiling->crush = true;
-	    ceiling->topheight = sec->ceilingheight;
-	  case lowerAndCrush:
-	  case lowerToFloor:
-	    ceiling->bottomheight = sec->floorheight;
-	    if (type != lowerToFloor)
-		ceiling->bottomheight += 8*FRACUNIT;
-	    ceiling->direction = -1;
-	    ceiling->speed = CEILSPEED;
-	    break;
+        // new door thinker
+        rtn = 1;
+        ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVSPEC, 0);
+        P_AddThinker (&ceiling->thinker);
+        sec->specialdata = ceiling;
+        ceiling->thinker.function.acp1 = (actionf_p1)T_MoveCeiling;
+        ceiling->sector = sec;
+        ceiling->crush = false;
 
-	  case raiseToHighest:
-	    ceiling->topheight = P_FindHighestCeilingSurrounding(sec);
-	    ceiling->direction = 1;
-	    ceiling->speed = CEILSPEED;
-	    break;
-	}
-		
-	ceiling->tag = sec->tag;
-	ceiling->type = type;
-	P_AddActiveCeiling(ceiling);
+        switch(type)
+        {
+        case fastCrushAndRaise:
+            // [STRIFE]: Speed of fast crushers increased by 2x!
+            ceiling->crush = true;
+            ceiling->topheight = sec->ceilingheight;
+            ceiling->bottomheight = sec->floorheight + (8*FRACUNIT);
+            ceiling->direction = -1;
+            ceiling->speed = CEILSPEED * 4; // [STRIFE] Was CEILSPEED * 2
+            break;
+        
+        case lowerAndCrush:
+            // [STRIFE] lowerAndCrush doesn't seem to have crushed in DOOM,
+            // but it was certainly made to do so in Strife! It is also
+            // changed to lower all the way to the floor.
+            ceiling->crush = 1;
+            ceiling->direction = -1;
+            ceiling->speed = CEILSPEED;
+            ceiling->bottomheight = sec->floorheight;
+            break;
+
+        case silentCrushAndRaise:
+        case crushAndRaise:
+            ceiling->crush = true;
+            ceiling->topheight = sec->ceilingheight;
+
+        case lowerToFloor:
+            ceiling->bottomheight = sec->floorheight;
+            if (type != lowerToFloor)
+                ceiling->bottomheight += 8*FRACUNIT;
+            ceiling->direction = -1;
+            ceiling->speed = CEILSPEED;
+            break;
+
+        case raiseToHighest:
+            ceiling->topheight = P_FindHighestCeilingSurrounding(sec);
+            ceiling->direction = 1;
+            ceiling->speed = CEILSPEED;
+            break;
+        }
+
+        ceiling->tag = sec->tag;
+        ceiling->type = type;
+        P_AddActiveCeiling(ceiling);
     }
     return rtn;
 }
--- a/src/strife/p_map.c
+++ b/src/strife/p_map.c
@@ -1370,35 +1370,40 @@
     fixed_t	dx;
     fixed_t	dy;
     fixed_t	dist;
-	
-    if (!(thing->flags & MF_SHOOTABLE) )
-	return true;
 
+    if (!(thing->flags & MF_SHOOTABLE))
+        return true;
+
+    // haleyjd 10/04/10: Spectrals are not damaged by blast radii
+    if(thing->flags & MF_SPECTRAL)
+        return true;
+
     // Boss spider and cyborg
     // take no damage from concussion.
     // villsa [STRIFE] unused
-    /*if (thing->type == MT_CYBORG
-	|| thing->type == MT_SPIDER)
-	return true;	*/
-		
+    // haleyjd: INQUISITOR
+
+    if(thing->type == MT_INQUISITOR)
+        return true;
+
     dx = abs(thing->x - bombspot->x);
     dy = abs(thing->y - bombspot->y);
-    
+
     dist = dx>dy ? dx : dy;
     dist = (dist - thing->radius) >> FRACBITS;
 
     if (dist < 0)
-	dist = 0;
+        dist = 0;
 
     if (dist >= bombdamage)
-	return true;	// out of range
+        return true;	// out of range
 
     if ( P_CheckSight (thing, bombspot) )
     {
-	// must be in direct path
-	P_DamageMobj (thing, bombspot, bombsource, bombdamage - dist);
+        // must be in direct path
+        P_DamageMobj (thing, bombspot, bombsource, bombdamage - dist);
     }
-    
+
     return true;
 }
 
@@ -1409,20 +1414,20 @@
 //
 void
 P_RadiusAttack
-( mobj_t*	spot,
-  mobj_t*	source,
-  int		damage )
+( mobj_t*       spot,
+  mobj_t*       source,
+  int           damage )
 {
-    int		x;
-    int		y;
+    int         x;
+    int         y;
     
-    int		xl;
-    int		xh;
-    int		yl;
-    int		yh;
+    int         xl;
+    int         xh;
+    int         yl;
+    int         yh;
     
-    fixed_t	dist;
-	
+    fixed_t     dist;
+
     dist = (damage+MAXRADIUS)<<FRACBITS;
     yh = (spot->y + dist - bmaporgy)>>MAPBLOCKSHIFT;
     yl = (spot->y - dist - bmaporgy)>>MAPBLOCKSHIFT;
@@ -1431,18 +1436,18 @@
     bombspot = spot;
     bombsource = source;
     bombdamage = damage;
-	
+
     for (y=yl ; y<=yh ; y++)
-	for (x=xl ; x<=xh ; x++)
-	    P_BlockThingsIterator (x, y, PIT_RadiusAttack );
+        for (x=xl ; x<=xh ; x++)
+            P_BlockThingsIterator (x, y, PIT_RadiusAttack );
 
-    // villsa [STRIFE] TODO - verify. what on earth is it trying to do here?
-    spot->z += MAXRADIUS;
-    P_LineAttack(spot, 0, dist, 1, 0);
-    P_LineAttack(spot, ANG90, dist, 1, 0);
+    // villsa [STRIFE] Send out 0 damage tracers to shatter nearby glass.
+    spot->z += 32*FRACUNIT;
+    P_LineAttack(spot, 0,      dist, 1, 0);
+    P_LineAttack(spot, ANG90,  dist, 1, 0);
     P_LineAttack(spot, ANG180, dist, 1, 0);
     P_LineAttack(spot, ANG270, dist, 1, 0);
-    spot->z -= MAXRADIUS;
+    spot->z -= 32*FRACUNIT;
 }