Replace "Block Enemies" with "Block Players"

We don't need the ability to make invisible walls for enemies as often as we've needed invisible walls for players that don't block their thrown items.
This commit is contained in:
Sally Cochenour 2020-03-21 19:08:59 -04:00
parent 21f28b27f5
commit 58df481cd3
7 changed files with 29 additions and 29 deletions

View file

@ -8175,8 +8175,8 @@ static const char *const PLAYERFLAG_LIST[] = {
#ifdef HAVE_BLUA
// Linedef flags
static const char *const ML_LIST[16] = {
"IMPASSIBLE",
"BLOCKMONSTERS",
"IMPASSABLE",
"BLOCKPLAYERS",
"TWOSIDED",
"DONTPEGTOP",
"DONTPEGBOTTOM",

View file

@ -94,10 +94,10 @@ typedef struct
//
// Solid, is an obstacle.
#define ML_IMPASSIBLE 1
#define ML_IMPASSABLE 1
// Blocks monsters only.
#define ML_BLOCKMONSTERS 2
// SRB2Kart: Blocks players only; items can be thrown through these.
#define ML_BLOCKPLAYERS 2
// Backside will not be present at all if not two sided.
#define ML_TWOSIDED 4

View file

@ -484,7 +484,7 @@ INT32 EV_DoCeiling(line_t *line, ceiling_e type)
}
// chained linedef executing ability
if (line->flags & ML_BLOCKMONSTERS)
if (line->flags & ML_BLOCKPLAYERS)
{
// only set it on ONE of the moving sectors (the smallest numbered)
// and front side x offset must be positive

View file

@ -2747,7 +2747,7 @@ INT32 EV_DoFloor(line_t *line, floor_e floortype)
dofloor->direction = -1; // down
// chained linedef executing ability
if (line->flags & ML_BLOCKMONSTERS)
if (line->flags & ML_BLOCKPLAYERS)
{
// Only set it on one of the moving sectors (the
// smallest numbered) and only if the front side

View file

@ -2006,10 +2006,10 @@ if (tmthing->flags & MF_PAPERCOLLISION) // Caution! Turning whilst up against a
// missiles can cross uncrossable lines
if (!(tmthing->flags & MF_MISSILE))
{
if (ld->flags & ML_IMPASSIBLE) // block objects from moving through this linedef.
if (ld->flags & ML_IMPASSABLE) // block objects from moving through this linedef.
return false;
if ((tmthing->flags & (MF_ENEMY|MF_BOSS)) && ld->flags & ML_BLOCKMONSTERS)
return false; // block monsters only
if (tmthing->player && ld->flags & ML_BLOCKPLAYERS)
return false; // SRB2Kart: Only block players, not items
}
// set openrange, opentop, openbottom
@ -3328,10 +3328,10 @@ static boolean PTR_SlideTraverse(intercept_t *in)
if (!(slidemo->flags & MF_MISSILE))
{
if (li->flags & ML_IMPASSIBLE)
if (li->flags & ML_IMPASSABLE)
goto isblocking;
if ((slidemo->flags & (MF_ENEMY|MF_BOSS)) && li->flags & ML_BLOCKMONSTERS)
if (slidemo->player && li->flags & ML_BLOCKPLAYERS)
goto isblocking;
}

View file

@ -2179,7 +2179,7 @@ boolean P_CheckSolidLava(mobj_t *mo, ffloor_t *rover)
*rover->topheight;
if (rover->flags & FF_SWIMMABLE && GETSECSPECIAL(rover->master->frontsector->special, 1) == 3
&& !(rover->master->flags & ML_BLOCKMONSTERS)
&& !(rover->master->flags & ML_BLOCKPLAYERS)
&& ((rover->master->flags & ML_EFFECT3) || mo->z-mo->momz > topheight - FixedMul(16*FRACUNIT, mo->scale)))
return true;
}

View file

@ -1651,7 +1651,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
if (rings > dist)
return false;
}
else if (triggerline->flags & ML_BLOCKMONSTERS)
else if (triggerline->flags & ML_BLOCKPLAYERS)
{
if (rings < dist)
return false;
@ -1729,7 +1729,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
if (lap < (sides[triggerline->sidenum[0]].textureoffset >> FRACBITS))
return false;
}
else if (triggerline->flags & ML_BLOCKMONSTERS) // Need lower than or equal to
else if (triggerline->flags & ML_BLOCKPLAYERS) // Need lower than or equal to
{
if (lap > (sides[triggerline->sidenum[0]].textureoffset >> FRACBITS))
return false;
@ -2298,8 +2298,8 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
return;
if (bot)
P_Teleport(bot, dest->x, dest->y, dest->z, (line->flags & ML_NOCLIMB) ? mo->angle : dest->angle, (line->flags & ML_BLOCKMONSTERS) == 0, (line->flags & ML_EFFECT4) == ML_EFFECT4);
if (line->flags & ML_BLOCKMONSTERS)
P_Teleport(bot, dest->x, dest->y, dest->z, (line->flags & ML_NOCLIMB) ? mo->angle : dest->angle, (line->flags & ML_BLOCKPLAYERS) == 0, (line->flags & ML_EFFECT4) == ML_EFFECT4);
if (line->flags & ML_BLOCKPLAYERS)
P_Teleport(mo, dest->x, dest->y, dest->z, (line->flags & ML_NOCLIMB) ? mo->angle : dest->angle, false, (line->flags & ML_EFFECT4) == ML_EFFECT4);
else
{
@ -2361,7 +2361,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
mapmusname[6] = 0;
mapmusflags = tracknum & MUSIC_TRACKMASK;
if (!(line->flags & ML_BLOCKMONSTERS))
if (!(line->flags & ML_BLOCKPLAYERS))
mapmusflags |= MUSIC_RELOADRESET;
if (line->flags & ML_BOUNCY)
mapmusflags |= MUSIC_FORCERESET;
@ -2381,7 +2381,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
}
// Except, you can use the ML_BLOCKMONSTERS flag to change this behavior.
// Except, you can use the ML_BLOCKPLAYERS flag to change this behavior.
// if (mapmusflags & MUSIC_RELOADRESET) then it will reset the music in G_PlayerReborn.
}
break;
@ -2451,7 +2451,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
// play the sound from nowhere
S_StartSound(NULL, sfxnum);
}
else if (line->flags & ML_BLOCKMONSTERS)
else if (line->flags & ML_BLOCKPLAYERS)
{
// play the sound from calling sector's soundorg
if (callsec)
@ -2800,7 +2800,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
var1 = sides[line->sidenum[0]].toptexture; //(line->dx>>FRACBITS)-1;
if (line->sidenum[1] != 0xffff && line->flags & ML_BLOCKMONSTERS) // read power from back sidedef
if (line->sidenum[1] != 0xffff && line->flags & ML_BLOCKPLAYERS) // read power from back sidedef
var2 = sides[line->sidenum[1]].toptexture;
else if (line->flags & ML_NOCLIMB) // 'Infinite'
var2 = UINT16_MAX;
@ -3956,7 +3956,7 @@ DoneSection2:
if (gametype == GT_COOP && lineindex != -1) // Custom exit!
{
// Special goodies with the block monsters flag depending on emeralds collected
if ((lines[lineindex].flags & ML_BLOCKMONSTERS) && ALL7EMERALDS(emeralds))
if ((lines[lineindex].flags & ML_BLOCKPLAYERS) && ALL7EMERALDS(emeralds))
nextmapoverride = (INT16)(lines[lineindex].frontsector->ceilingheight>>FRACBITS);
else
nextmapoverride = (INT16)(lines[lineindex].frontsector->floorheight>>FRACBITS);
@ -5349,7 +5349,7 @@ static void P_AddRaiseThinker(sector_t *sec, line_t *sourceline)
raise->thinker.function.acp1 = (actionf_p1)T_RaiseSector;
if (sourceline->flags & ML_BLOCKMONSTERS)
if (sourceline->flags & ML_BLOCKPLAYERS)
raise->vars[0] = 1;
else
raise->vars[0] = 0;
@ -5408,7 +5408,7 @@ static void P_AddOldAirbob(sector_t *sec, line_t *sourceline, boolean noadjust)
airbob->vars[3] = airbob->vars[2];
if (sourceline->flags & ML_BLOCKMONSTERS)
if (sourceline->flags & ML_BLOCKPLAYERS)
airbob->vars[0] = 1;
else
airbob->vars[0] = 0;
@ -5989,7 +5989,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
break;
case 64: // Appearing/Disappearing FOF option
if (lines[i].flags & ML_BLOCKMONSTERS) { // Find FOFs by control sector tag
if (lines[i].flags & ML_BLOCKPLAYERS) { // Find FOFs by control sector tag
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
for (j = 0; (unsigned)j < sectors[s].linecount; j++)
if (sectors[s].lines[j]->special >= 100 && sectors[s].lines[j]->special < 300)
@ -6217,7 +6217,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
case 150: // Air bobbing platform
case 151: // Adjustable air bobbing platform
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
lines[i].flags |= ML_BLOCKMONSTERS;
lines[i].flags |= ML_BLOCKPLAYERS;
P_AddOldAirbob(lines[i].frontsector, lines + i, (lines[i].special != 151));
break;
case 152: // Adjustable air bobbing platform in reverse
@ -6272,14 +6272,14 @@ void P_SpawnSpecials(INT32 fromnetsave)
case 176: // Air bobbing platform that will crumble and bob on the water when it falls and hits
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_FLOATBOB|FF_CRUMBLE, secthinkers);
lines[i].flags |= ML_BLOCKMONSTERS;
lines[i].flags |= ML_BLOCKPLAYERS;
P_AddOldAirbob(lines[i].frontsector, lines + i, true);
break;
case 177: // Air bobbing platform that will crumble and bob on
// the water when it falls and hits, then never return
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL|FF_FLOATBOB|FF_CRUMBLE|FF_NORETURN, secthinkers);
lines[i].flags |= ML_BLOCKMONSTERS;
lines[i].flags |= ML_BLOCKPLAYERS;
P_AddOldAirbob(lines[i].frontsector, lines + i, true);
break;
@ -6293,7 +6293,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
case 180: // Air bobbing platform that will crumble
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL|FF_CRUMBLE, secthinkers);
lines[i].flags |= ML_BLOCKMONSTERS;
lines[i].flags |= ML_BLOCKPLAYERS;
P_AddOldAirbob(lines[i].frontsector, lines + i, true);
break;