summaryrefslogtreecommitdiff
path: root/src/strife/p_switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/p_switch.c')
-rw-r--r--src/strife/p_switch.c761
1 files changed, 383 insertions, 378 deletions
diff --git a/src/strife/p_switch.c b/src/strife/p_switch.c
index e18ecb6f..0904c035 100644
--- a/src/strife/p_switch.c
+++ b/src/strife/p_switch.c
@@ -447,404 +447,409 @@ static void P_MoveWall(line_t *line, mobj_t *thing)
//
boolean
P_UseSpecialLine
-( mobj_t* thing,
- line_t* line,
- int side )
-{
-
+( mobj_t* thing,
+ line_t* line,
+ int side )
+{
// Err...
// Use the back sides of VERY SPECIAL lines...
if (side)
{
- switch(line->special)
- {
- case 124:
- // Sliding door open&close
- // UNUSED?
- break;
+ switch(line->special)
+ {
+ case 148: // haleyjd [STRIFE]
+ break;
- default:
- return false;
- break;
- }
+ default:
+ return false;
+ break;
+ }
}
// Switches that other things can activate.
if (!thing->player)
{
- // never open secret doors
- if (line->flags & ML_SECRET)
- return false;
-
- switch(line->special)
- {
- case 1: // MANUAL DOOR RAISE
- case 32: // MANUAL BLUE
- case 33: // MANUAL RED
- case 34: // MANUAL YELLOW
- break;
-
- default:
- return false;
- break;
- }
+ // never open secret doors
+ if (line->flags & ML_SECRET)
+ return false;
+
+ switch(line->special)
+ {
+ case 1: // MANUAL DOOR RAISE
+ case 144: // haleyjd [STRIFE] Manual sliding door
+ break;
+
+ default:
+ return false;
+ break;
+ }
}
+ // [STRIFE] TODO: here on down mostly untouched so far,
+ // except for a few new types at the bottom.
// do something
switch (line->special)
{
- // MANUALS
- case 1: // Vertical Door
- case 26: // Blue Door/Locked
- case 27: // Yellow Door /Locked
- case 28: // Red Door /Locked
-
- case 31: // Manual door open
- case 32: // Blue locked door open
- case 33: // Red locked door open
- case 34: // Yellow locked door open
-
- case 117: // Blazing door raise
- case 118: // Blazing door open
- EV_VerticalDoor (line, thing);
- break;
-
- // SWITCHES
- case 7:
- // Build Stairs
- if (EV_BuildStairs(line,build8))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 9:
- // Change Donut
- if (EV_DoDonut(line))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 11:
- // Exit level
- P_ChangeSwitchTexture(line,0);
- G_ExitLevel (0);
- break;
-
- case 14:
- // Raise Floor 32 and change texture
- if (EV_DoPlat(line,raiseAndChange,32))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 15:
- // Raise Floor 24 and change texture
- if (EV_DoPlat(line,raiseAndChange,24))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 18:
- // Raise Floor to next highest floor
- if (EV_DoFloor(line, raiseFloorToNearest))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 20:
- // Raise Plat next highest floor and change texture
- if (EV_DoPlat(line,raiseToNearestAndChange,0))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 21:
- // PlatDownWaitUpStay
- if (EV_DoPlat(line,downWaitUpStay,0))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 23:
- // Lower Floor to Lowest
- if (EV_DoFloor(line,lowerFloorToLowest))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 29:
- // Raise Door
- if (EV_DoDoor(line,normal))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 40:
- // villsa [STRIFE] Split Open Door
+ // MANUALS
+ case 1: // Vertical Door
+ case 26: // Blue Door/Locked
+ case 27: // Yellow Door /Locked
+ case 28: // Red Door /Locked
+
+ case 31: // Manual door open
+ case 32: // Blue locked door open
+ case 33: // Red locked door open
+ case 34: // Yellow locked door open
+
+ case 117: // Blazing door raise
+ case 118: // Blazing door open
+ EV_VerticalDoor (line, thing);
+ break;
+
+ // SWITCHES
+ case 7:
+ // Build Stairs
+ if (EV_BuildStairs(line,build8))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 9:
+ // Change Donut
+ if (EV_DoDonut(line))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 11:
+ // Exit level
+ P_ChangeSwitchTexture(line,0);
+ G_ExitLevel (0);
+ break;
+
+ case 14:
+ // Raise Floor 32 and change texture
+ if (EV_DoPlat(line,raiseAndChange,32))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 15:
+ // Raise Floor 24 and change texture
+ if (EV_DoPlat(line,raiseAndChange,24))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 18:
+ // Raise Floor to next highest floor
+ if (EV_DoFloor(line, raiseFloorToNearest))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 20:
+ // Raise Plat next highest floor and change texture
+ if (EV_DoPlat(line,raiseToNearestAndChange,0))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 21:
+ // PlatDownWaitUpStay
+ if (EV_DoPlat(line,downWaitUpStay,0))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 23:
+ // Lower Floor to Lowest
+ if (EV_DoFloor(line,lowerFloorToLowest))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 29:
+ // Raise Door
+ if (EV_DoDoor(line,normal))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 40:
+ // villsa [STRIFE] Split Open Door
if(EV_DoDoor(line, splitOpen))
P_ChangeSwitchTexture(line, 0);
-
- case 41:
- // Lower Ceiling to Floor
- if (EV_DoCeiling(line,lowerToFloor))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 71:
- // Turbo Lower Floor
- if (EV_DoFloor(line,turboLower))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 49:
- // Ceiling Crush And Raise
- if (EV_DoCeiling(line,crushAndRaise))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 50:
- // Close Door
- if (EV_DoDoor(line,close))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 51:
- // Secret EXIT
- P_ChangeSwitchTexture(line,0);
- //G_SecretExitLevel ();
- break;
-
- case 55:
- // Raise Floor Crush
- if (EV_DoFloor(line,raiseFloorCrush))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 101:
- // Raise Floor
- if (EV_DoFloor(line,raiseFloor))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 102:
- // Lower Floor to Surrounding floor height
- if (EV_DoFloor(line,lowerFloor))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 103:
- // Open Door
- if (EV_DoDoor(line,open))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 111:
- // Blazing Door Raise (faster than TURBO!)
- if (EV_DoDoor (line,blazeRaise))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 112:
- // Blazing Door Open (faster than TURBO!)
- if (EV_DoDoor (line,blazeOpen))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 113:
- // Blazing Door Close (faster than TURBO!)
- if (EV_DoDoor (line,blazeClose))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 122:
- // Blazing PlatDownWaitUpStay
- if (EV_DoPlat(line,blazeDWUS,0))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 127:
- // Build Stairs Turbo 16
- if (EV_BuildStairs(line,turbo16))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 131:
- // Raise Floor Turbo
- if (EV_DoFloor(line,raiseFloorTurbo))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 133:
- // BlzOpenDoor BLUE
- case 135:
- // BlzOpenDoor RED
- case 137:
- // BlzOpenDoor YELLOW
- if (EV_DoLockedDoor (line,blazeOpen,thing))
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 140:
- // Raise Floor 512
- if (EV_DoFloor(line,raiseFloor512))
- P_ChangeSwitchTexture(line,0);
- break;
-
- // BUTTONS
- case 42:
- // Close Door
- if (EV_DoDoor(line,close))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 43:
- // Lower Ceiling to Floor
- if (EV_DoCeiling(line,lowerToFloor))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 45:
- // Lower Floor to Surrounding floor height
- if (EV_DoFloor(line,lowerFloor))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 60:
- // Lower Floor to Lowest
- if (EV_DoFloor(line,lowerFloorToLowest))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 61:
- // Open Door
- if (EV_DoDoor(line,open))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 62:
- // PlatDownWaitUpStay
- if (EV_DoPlat(line,downWaitUpStay,1))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 63:
- // Raise Door
- if (EV_DoDoor(line,normal))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 64:
- // Raise Floor to ceiling
- if (EV_DoFloor(line,raiseFloor))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 66:
- // Raise Floor 24 and change texture
- if (EV_DoPlat(line,raiseAndChange,24))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 67:
- // Raise Floor 32 and change texture
- if (EV_DoPlat(line,raiseAndChange,32))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 65:
- // Raise Floor Crush
- if (EV_DoFloor(line,raiseFloorCrush))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 68:
- // Raise Plat to next highest floor and change texture
- if (EV_DoPlat(line,raiseToNearestAndChange,0))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 69:
- // Raise Floor to next highest floor
- if (EV_DoFloor(line, raiseFloorToNearest))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 70:
- // Turbo Lower Floor
- if (EV_DoFloor(line,turboLower))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 114:
- // Blazing Door Raise (faster than TURBO!)
- if (EV_DoDoor (line,blazeRaise))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 115:
- // Blazing Door Open (faster than TURBO!)
- if (EV_DoDoor (line,blazeOpen))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 116:
- // Blazing Door Close (faster than TURBO!)
- if (EV_DoDoor (line,blazeClose))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 123:
- // Blazing PlatDownWaitUpStay
- if (EV_DoPlat(line,blazeDWUS,0))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 132:
- // Raise Floor Turbo
- if (EV_DoFloor(line,raiseFloorTurbo))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 99:
- // BlzOpenDoor BLUE
- case 134:
- // BlzOpenDoor RED
- case 136:
- // BlzOpenDoor YELLOW
- if (EV_DoLockedDoor (line,blazeOpen,thing))
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 138:
- // Light Turn On
- EV_LightTurnOn(line,255);
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 139:
- // Light Turn Off
- EV_LightTurnOn(line,35);
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 144:
- // villsa [STRIFE] manual sliding door
- EV_SlidingDoor(line, thing);
- break;
-
- case 207:
- // villsa [STRIFE] remote sliding door
- if(EV_RemoteSlidingDoor(line, thing))
- P_ChangeSwitchTexture(line, 1);
-
- case 229:
- // villsa [STRIFE] sigil sliding door
- if(thing->player && thing->player->sigiltype == 4)
- {
- if(EV_RemoteSlidingDoor(line, thing))
- P_ChangeSwitchTexture(line, 1);
- }
-
- case 666:
- // villsa [STRIFE] Move wall
- P_MoveWall(line, thing);
- break;
-
+
+ case 41:
+ // Lower Ceiling to Floor
+ if (EV_DoCeiling(line,lowerToFloor))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 71:
+ // Turbo Lower Floor
+ if (EV_DoFloor(line,turboLower))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 49:
+ // Ceiling Crush And Raise
+ if (EV_DoCeiling(line,crushAndRaise))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 50:
+ // Close Door
+ if (EV_DoDoor(line,close))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 51:
+ // Secret EXIT
+ P_ChangeSwitchTexture(line,0);
+ //G_SecretExitLevel ();
+ break;
+
+ case 55:
+ // Raise Floor Crush
+ if (EV_DoFloor(line,raiseFloorCrush))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 101:
+ // Raise Floor
+ if (EV_DoFloor(line,raiseFloor))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 102:
+ // Lower Floor to Surrounding floor height
+ if (EV_DoFloor(line,lowerFloor))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 103:
+ // Open Door
+ if (EV_DoDoor(line,open))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 111:
+ // Blazing Door Raise (faster than TURBO!)
+ if (EV_DoDoor (line,blazeRaise))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 112:
+ // Blazing Door Open (faster than TURBO!)
+ if (EV_DoDoor (line,blazeOpen))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 113:
+ // Blazing Door Close (faster than TURBO!)
+ if (EV_DoDoor (line,blazeClose))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 122:
+ // Blazing PlatDownWaitUpStay
+ if (EV_DoPlat(line,blazeDWUS,0))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 127:
+ // Build Stairs Turbo 16
+ if (EV_BuildStairs(line,turbo16))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 131:
+ // Raise Floor Turbo
+ if (EV_DoFloor(line,raiseFloorTurbo))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 133:
+ // BlzOpenDoor BLUE
+ case 135:
+ // BlzOpenDoor RED
+ case 137:
+ // BlzOpenDoor YELLOW
+ if (EV_DoLockedDoor (line,blazeOpen,thing))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 140:
+ // Raise Floor 512
+ if (EV_DoFloor(line,raiseFloor512))
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ // BUTTONS
+ case 42:
+ // Close Door
+ if (EV_DoDoor(line,close))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 43:
+ // Lower Ceiling to Floor
+ if (EV_DoCeiling(line,lowerToFloor))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 45:
+ // Lower Floor to Surrounding floor height
+ if (EV_DoFloor(line,lowerFloor))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 60:
+ // Lower Floor to Lowest
+ if (EV_DoFloor(line,lowerFloorToLowest))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 61:
+ // Open Door
+ if (EV_DoDoor(line,open))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 62:
+ // PlatDownWaitUpStay
+ if (EV_DoPlat(line,downWaitUpStay,1))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 63:
+ // Raise Door
+ if (EV_DoDoor(line,normal))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 64:
+ // Raise Floor to ceiling
+ if (EV_DoFloor(line,raiseFloor))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 66:
+ // Raise Floor 24 and change texture
+ if (EV_DoPlat(line,raiseAndChange,24))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 67:
+ // Raise Floor 32 and change texture
+ if (EV_DoPlat(line,raiseAndChange,32))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 65:
+ // Raise Floor Crush
+ if (EV_DoFloor(line,raiseFloorCrush))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 68:
+ // Raise Plat to next highest floor and change texture
+ if (EV_DoPlat(line,raiseToNearestAndChange,0))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 69:
+ // Raise Floor to next highest floor
+ if (EV_DoFloor(line, raiseFloorToNearest))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 70:
+ // Turbo Lower Floor
+ if (EV_DoFloor(line,turboLower))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 114:
+ // Blazing Door Raise (faster than TURBO!)
+ if (EV_DoDoor (line,blazeRaise))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 115:
+ // Blazing Door Open (faster than TURBO!)
+ if (EV_DoDoor (line,blazeOpen))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 116:
+ // Blazing Door Close (faster than TURBO!)
+ if (EV_DoDoor (line,blazeClose))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 123:
+ // Blazing PlatDownWaitUpStay
+ if (EV_DoPlat(line,blazeDWUS,0))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 132:
+ // Raise Floor Turbo
+ if (EV_DoFloor(line,raiseFloorTurbo))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 99:
+ // BlzOpenDoor BLUE
+ case 134:
+ // BlzOpenDoor RED
+ case 136:
+ // BlzOpenDoor YELLOW
+ if (EV_DoLockedDoor (line,blazeOpen,thing))
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 138:
+ // Light Turn On
+ EV_LightTurnOn(line,255);
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 139:
+ // Light Turn Off
+ EV_LightTurnOn(line,35);
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 144:
+ // villsa [STRIFE] manual sliding door
+ EV_SlidingDoor(line, thing);
+ break;
+
+ case 148:
+ // haleyjd 09/16/10: [STRIFE] using forcefields hurts
+ P_DamageMobj(thing, NULL, NULL, 16);
+ P_Thrust(thing->player, thing->angle + ANG180, 125*FRACUNIT/16);
+ break;
+
+ case 207:
+ // villsa [STRIFE] remote sliding door
+ if(EV_RemoteSlidingDoor(line, thing))
+ P_ChangeSwitchTexture(line, 1);
+ break; // haleyjd
+
+ case 229:
+ // villsa [STRIFE] sigil sliding door
+ if(thing->player && thing->player->sigiltype == 4)
+ {
+ if(EV_RemoteSlidingDoor(line, thing))
+ P_ChangeSwitchTexture(line, 1);
+ }
+ break; // haleyjd
+
+ case 666:
+ // villsa [STRIFE] Move wall
+ P_MoveWall(line, thing);
+ break;
+
}
-
+
return true;
}