mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 05:01:41 +00:00
- added ML_BLOCKPROJECTILE flag to lines.
SVN r1440 (trunk)
This commit is contained in:
parent
eb47f4fdbf
commit
613ae5e022
7 changed files with 49 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
February 22, 2009 (Changes by Graf Zahl)
|
||||
- added ML_BLOCKPROJECTILE flag to lines.
|
||||
- Fixed: With opl_onechip set the second OPL chip was never set to anything valid
|
||||
so it contained an invalid pointer. There were also a few other places that
|
||||
simply assumed that the second chip is set to something valid.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
===============================================================================
|
||||
Universal Doom Map Format ZDoom extensions v1.2 - 21.08.2008
|
||||
Universal Doom Map Format ZDoom extensions v1.5 - 22.02.2009
|
||||
|
||||
|
||||
Copyright (c) 2008 Christoph Oelckers.
|
||||
|
@ -102,6 +102,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
wrapmidtex = <bool>; // Line's mid textures are wrapped.
|
||||
midtex3d = <bool>; // Actors can walk on mid texture.
|
||||
checkswitchrange = <bool>;// Switches can only be activated when vertically reachable.
|
||||
blockprojectiles = <bool>;// Line blocks all projectiles
|
||||
|
||||
}
|
||||
|
||||
|
@ -200,6 +201,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
Bit 4 (Value 16): wrapmidtex
|
||||
Bit 5 (Value 32): midtex3d
|
||||
Bit 6 (Value 64): checkswitchrange
|
||||
Bit 7 (Value 128): firstsideonly
|
||||
|
||||
When used in special 208 this arg should be cleared afterward.
|
||||
|
||||
|
@ -229,6 +231,8 @@ integer, not float
|
|||
Changed description of class and skill thing flags to avoid the impression that
|
||||
this uses array syntax. No functional changes
|
||||
|
||||
1.5 22.02.2009
|
||||
Added blockprojectiles to lines and firstsideonly to conversion notes
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
|
|
|
@ -149,6 +149,7 @@ enum ELineFlags
|
|||
ML_3DMIDTEX = 0x00200000,
|
||||
ML_CHECKSWITCHRANGE = 0x00400000,
|
||||
ML_FIRSTSIDEONLY = 0x00800000, // activated only when crossed from front side
|
||||
ML_BLOCKPROJECTILE = 0x01000000,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -409,5 +409,6 @@ xx(light)
|
|||
xx(lightabsolute)
|
||||
xx(nofakecontrast)
|
||||
xx(smoothlighting)
|
||||
xx(blockprojectiles)
|
||||
|
||||
xx(Renderstyle)
|
||||
|
|
|
@ -2357,6 +2357,39 @@ FUNC(LS_Line_SetTextureOffset)
|
|||
return true;
|
||||
}
|
||||
|
||||
FUNC(LS_Line_SetBlocking)
|
||||
// Line_SetBlocking (id, setflags, clearflags)
|
||||
{
|
||||
static const int flagtrans[] =
|
||||
{
|
||||
ML_BLOCKING,
|
||||
ML_BLOCKMONSTERS,
|
||||
ML_BLOCK_PLAYERS,
|
||||
ML_BLOCK_FLOATERS,
|
||||
ML_BLOCKPROJECTILE,
|
||||
ML_BLOCKEVERYTHING,
|
||||
ML_RAILING,
|
||||
-1
|
||||
};
|
||||
|
||||
if (arg0 == 0) return false;
|
||||
|
||||
int setflags = 0;
|
||||
int clearflags = 0;
|
||||
|
||||
for(int i = 0; flagtrans[i] != -1; i++, arg1 >>= 1, arg2 >>= 1)
|
||||
{
|
||||
if (arg1 & 1) setflags |= flagtrans[i];
|
||||
if (arg2 & 1) clearflags |= flagtrans[i];
|
||||
}
|
||||
|
||||
for(int line = -1; (line = P_FindLineFromID (arg0, line)) >= 0; )
|
||||
{
|
||||
lines[line].flags = (lines[line].flags & ~clearflags) | setflags;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
FUNC(LS_ChangeCamera)
|
||||
|
@ -2942,8 +2975,8 @@ lnSpecFunc LineSpecials[256] =
|
|||
LS_Sector_SetLink,
|
||||
LS_Scroll_Wall,
|
||||
LS_Line_SetTextureOffset,
|
||||
LS_NOP, // 54
|
||||
LS_NOP, // 55
|
||||
LS_Sector_ChangeFlags,
|
||||
LS_Line_SetBlocking,
|
||||
LS_NOP, // 56
|
||||
LS_NOP, // 57
|
||||
LS_NOP, // 58
|
||||
|
|
|
@ -562,7 +562,7 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!(tm.thing->flags & MF_MISSILE) || (ld->flags & ML_BLOCKEVERYTHING))
|
||||
if (!(tm.thing->flags & MF_MISSILE) || (ld->flags & (ML_BLOCKEVERYTHING|ML_BLOCKPROJECTILE)))
|
||||
{
|
||||
if (ld->flags & ML_RAILING)
|
||||
{
|
||||
|
@ -571,6 +571,7 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm)
|
|||
else if ((ld->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING)) || // explicitly blocking everything
|
||||
(!(tm.thing->flags3 & MF3_NOBLOCKMONST) && (ld->flags & ML_BLOCKMONSTERS)) || // block monsters only
|
||||
(tm.thing->player != NULL && (ld->flags & ML_BLOCK_PLAYERS)) || // block players
|
||||
((tm.thing->flags & MF_MISSILE) && (ld->flags & ML_BLOCKPROJECTILE)) || // block projectiles
|
||||
((ld->flags & ML_BLOCK_FLOATERS) && (tm.thing->flags & MF_FLOAT))) // block floaters
|
||||
{
|
||||
if (tm.thing->flags2 & MF2_BLASTED)
|
||||
|
|
|
@ -628,6 +628,10 @@ struct UDMFParser
|
|||
Flag(ld->flags, ML_FIRSTSIDEONLY, key);
|
||||
break;
|
||||
|
||||
case NAME_blockprojectiles:
|
||||
Flag(ld->flags, ML_BLOCKPROJECTILE, key);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue