summaryrefslogtreecommitdiff
path: root/src/strife/p_ceilng.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_ceilng.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_ceilng.c')
-rw-r--r--src/strife/p_ceilng.c133
1 files changed, 74 insertions, 59 deletions
diff --git a/src/strife/p_ceilng.c b/src/strife/p_ceilng.c
index 58b9eb06..ec07eeaf 100644
--- a/src/strife/p_ceilng.c
+++ b/src/strife/p_ceilng.c
@@ -165,78 +165,93 @@ void T_MoveCeiling (ceiling_t* ceiling)
// 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;
}