This commit is contained in:
Christoph Oelckers 2014-09-29 00:43:19 +02:00
commit c66c497811
5 changed files with 47 additions and 26 deletions

View File

@ -109,6 +109,9 @@ Note: All <bool> fields default to false unless mentioned otherwise.
clipmidtex = <bool>; // Line's mid textures are clipped to floor and ceiling. clipmidtex = <bool>; // Line's mid textures are clipped to floor and ceiling.
wrapmidtex = <bool>; // Line's mid textures are wrapped. wrapmidtex = <bool>; // Line's mid textures are wrapped.
midtex3d = <bool>; // Actors can walk on mid texture. midtex3d = <bool>; // Actors can walk on mid texture.
midtex3dimpassible = <bool>;// Used in conjuction with midtex3d - causes the mid
// texture to behave like an impassible line (projectiles
// pass through it).
checkswitchrange = <bool>; // Switches can only be activated when vertically reachable. checkswitchrange = <bool>; // Switches can only be activated when vertically reachable.
blockprojectiles = <bool>; // Line blocks all projectiles blockprojectiles = <bool>; // Line blocks all projectiles
blockuse = <bool>; // Line blocks all use actions blockuse = <bool>; // Line blocks all use actions

View File

@ -162,6 +162,7 @@ enum ELineFlags
ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line
ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight
ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks
ML_3DMIDTEX_IMPASS = 0x10000000, // [TP] if 3D midtex, behaves like a height-restricted ML_BLOCKING
}; };

View File

@ -420,6 +420,7 @@ xx(Passuse)
xx(Repeatspecial) xx(Repeatspecial)
xx(Conversation) xx(Conversation)
xx(Locknumber) xx(Locknumber)
xx(Midtex3dimpassible)
xx(Playercross) xx(Playercross)
xx(Playeruse) xx(Playeruse)

View File

@ -258,6 +258,13 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, f
bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, FLineOpening &open, bool restrict) bool P_LineOpening_3dMidtex(AActor *thing, const line_t *linedef, FLineOpening &open, bool restrict)
{ {
// [TP] Impassible-like 3dmidtextures do not block missiles
if ((linedef->flags & ML_3DMIDTEX_IMPASS)
&& (thing->flags & MF_MISSILE || thing->BounceFlags & BOUNCE_MBF))
{
return false;
}
fixed_t tt, tb; fixed_t tt, tb;
open.abovemidtex = false; open.abovemidtex = false;

View File

@ -1030,11 +1030,16 @@ public:
Flag(ld->flags, ML_BLOCKHITSCAN, key); Flag(ld->flags, ML_BLOCKHITSCAN, key);
continue; continue;
// [Dusk] lock number // [TP] Locks the special with a key
case NAME_Locknumber: case NAME_Locknumber:
ld->locknumber = CheckInt(key); ld->locknumber = CheckInt(key);
continue; continue;
// [TP] Causes a 3d midtex to behave like an impassible line
case NAME_Midtex3dimpassible:
Flag(ld->flags, ML_3DMIDTEX_IMPASS, key);
continue;
default: default:
break; break;
} }
@ -1081,6 +1086,10 @@ public:
{ {
ld->args[1] = -FName(arg1str); ld->args[1] = -FName(arg1str);
} }
if ((ld->flags & ML_3DMIDTEX_IMPASS) && !(ld->flags & ML_3DMIDTEX)) // [TP]
{
Printf ("Line %d has midtex3dimpassible without midtex3d.\n", index);
}
} }
//=========================================================================== //===========================================================================