summaryrefslogtreecommitdiff
path: root/src/strife/p_map.c
diff options
context:
space:
mode:
authorJames Haley2010-10-04 06:33:10 +0000
committerJames Haley2010-10-04 06:33:10 +0000
commitaedeaac6b7f27f5400bcae7f391c457ebad4da59 (patch)
tree9ee19b3a4246a1ef64f3b1a53059998c9efae11a /src/strife/p_map.c
parent6bb2e8481d33ecd2d489c01fba2940c2c315a995 (diff)
downloadchocolate-doom-aedeaac6b7f27f5400bcae7f391c457ebad4da59.tar.gz
chocolate-doom-aedeaac6b7f27f5400bcae7f391c457ebad4da59.tar.bz2
chocolate-doom-aedeaac6b7f27f5400bcae7f391c457ebad4da59.zip
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
Diffstat (limited to 'src/strife/p_map.c')
-rw-r--r--src/strife/p_map.c69
1 files changed, 37 insertions, 32 deletions
diff --git a/src/strife/p_map.c b/src/strife/p_map.c
index 99ae3d40..d5ab46aa 100644
--- a/src/strife/p_map.c
+++ b/src/strife/p_map.c
@@ -1370,35 +1370,40 @@ boolean PIT_RadiusAttack (mobj_t* thing)
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 @@ boolean PIT_RadiusAttack (mobj_t* thing)
//
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 @@ P_RadiusAttack
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;
}