Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Jul 3, 2023
1 parent 4343f00 commit 4227a08
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
10 changes: 8 additions & 2 deletions src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3453,18 +3453,24 @@ static bool P_ParseMapInfo(const char *scriptname)
{
SC_MustGetNumber();
special = sc_Number;

SC_MustGetNumber();
tag = sc_Number;

if (tag || special == 11 || special == 51 || special == 52 || special == 124)
if (tag
|| special == S1_ExitLevel
|| special == S1_ExitLevel_GoesToSecretLevel
|| special == W1_ExitLevel
|| special == W1_ExitLevel_GoesToSecretLevel)
{
if (info->numbossactions == -1)
info->numbossactions = 1;
else
info->numbossactions++;

info->bossactions = (bossaction_t *)realloc(info->bossactions,
info->bossactions = (bossaction_t *)I_Realloc(info->bossactions,
sizeof(bossaction_t) * info->numbossactions);

info->bossactions[info->numbossactions - 1].type = i;
info->bossactions[info->numbossactions - 1].special = special;
info->bossactions[info->numbossactions - 1].tag = tag;
Expand Down
38 changes: 19 additions & 19 deletions src/p_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,25 +360,25 @@ bool P_UseSpecialLine(mobj_t *thing, line_t *line, int side, bool bossaction)
switch (line->special)
{
// 0-tag specials, locked switches and teleporters need to be blocked for boss actions.
case 1: // MANUAL DOOR RAISE
case 32: // MANUAL BLUE
case 33: // MANUAL RED
case 34: // MANUAL YELLOW
case 117: // Blazing door raise
case 118: // Blazing door open
case 133: // BlzOpenDoor BLUE
case 135: // BlzOpenDoor RED
case 137: // BlzOpenDoor YEL

case 99: // BlzOpenDoor BLUE
case 134: // BlzOpenDoor RED
case 136: // BlzOpenDoor YELLOW

//jff 3/5/98 add ability to use teleporters for monsters
case 195: // switch teleporters
case 174:
case 210: // silent switch teleporters
case 209:
case DR_Door_OpenWaitClose_AlsoMonsters:
case D1_Door_Blue_OpenStay:
case D1_Door_Red_OpenStay:
case D1_Door_Yellow_OpenStay:
case DR_Door_OpenWaitClose_Fast:
case D1_Door_OpenStay_Fast:
case S1_Door_Blue_OpenStay_Fast:
case S1_Door_Red_OpenStay_Fast:
case S1_Door_Yellow_OpenStay_Fast:

case SR_Door_Blue_OpenStay_Fast:
case SR_Door_Red_OpenStay_Fast:
case SR_Door_Yellow_OpenStay_Fast:

// jff 3/5/98 add ability to use teleporters for monsters
case SR_Teleport_AlsoMonsters:
case S1_Teleport_AlsoMonsters:
case S1_Teleport_AlsoMonsters_Silent_SameAngle:
case SR_Teleport_AlsoMonsters_Silent_SameAngle:
return false;
break;
}
Expand Down

0 comments on commit 4227a08

Please sign in to comment.