mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 06:42:12 +00:00
- added a new 'playeruseback' linedef trigger type that allows using lines from the bxck side.
SVN r2302 (trunk)
This commit is contained in:
parent
674c63d66c
commit
bdc5d941c2
6 changed files with 52 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
||||||
===============================================================================
|
===============================================================================
|
||||||
Universal Doom Map Format ZDoom extensions v1.9 - 17.04.2010
|
Universal Doom Map Format ZDoom extensions v1.10 - 25.04.2010
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2008 Christoph Oelckers.
|
Copyright (c) 2008 Christoph Oelckers.
|
||||||
|
@ -89,6 +89,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
||||||
alpha = <float>; // Translucency of this line, default is 1.0
|
alpha = <float>; // Translucency of this line, default is 1.0
|
||||||
renderstyle = <string>; // Render style, can be "translucent" or "add",
|
renderstyle = <string>; // Render style, can be "translucent" or "add",
|
||||||
// default is "translucent".
|
// default is "translucent".
|
||||||
|
playeruseback = <bool>; // New SPAC flag, true = player can use from back side.
|
||||||
anycross = <bool>; // New SPAC flag, true = any non-projectile
|
anycross = <bool>; // New SPAC flag, true = any non-projectile
|
||||||
// crossing will trigger this line
|
// crossing will trigger this line
|
||||||
monsteractivate = <bool>; // Monsters can trigger this line.
|
monsteractivate = <bool>; // Monsters can trigger this line.
|
||||||
|
@ -259,6 +260,9 @@ Fixed conversion specifications for TranslucentLine special.
|
||||||
1.9 17.04.2010
|
1.9 17.04.2010
|
||||||
Changed node specifications to deprecate compression of node lump.
|
Changed node specifications to deprecate compression of node lump.
|
||||||
|
|
||||||
|
1.10 25.04.2010
|
||||||
|
Added 'playeruseback' line trigger flag.
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
EOF
|
EOF
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|
|
@ -169,8 +169,9 @@ enum SPAC
|
||||||
SPAC_AnyCross = 1<<7, // when anything without the MF2_TELEPORT flag crosses the line
|
SPAC_AnyCross = 1<<7, // when anything without the MF2_TELEPORT flag crosses the line
|
||||||
SPAC_MUse = 1<<8, // monsters can use
|
SPAC_MUse = 1<<8, // monsters can use
|
||||||
SPAC_MPush = 1<<9, // monsters can push
|
SPAC_MPush = 1<<9, // monsters can push
|
||||||
|
SPAC_UseBack = 1<<10, // Can be used from the backside
|
||||||
|
|
||||||
SPAC_PlayerActivate = (SPAC_Cross|SPAC_Use|SPAC_Impact|SPAC_Push|SPAC_AnyCross|SPAC_UseThrough),
|
SPAC_PlayerActivate = (SPAC_Cross|SPAC_Use|SPAC_Impact|SPAC_Push|SPAC_AnyCross|SPAC_UseThrough|SPAC_UseBack),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EMapLineFlags // These are flags that use different values internally
|
enum EMapLineFlags // These are flags that use different values internally
|
||||||
|
|
|
@ -386,6 +386,7 @@ xx(Repeatspecial)
|
||||||
|
|
||||||
xx(Playercross)
|
xx(Playercross)
|
||||||
xx(Playeruse)
|
xx(Playeruse)
|
||||||
|
xx(Playeruseback)
|
||||||
xx(Monstercross)
|
xx(Monstercross)
|
||||||
xx(Impact)
|
xx(Impact)
|
||||||
xx(Playerpush)
|
xx(Playerpush)
|
||||||
|
|
|
@ -3983,7 +3983,7 @@ bool P_UseTraverse(AActor *usething, fixed_t endx, fixed_t endy, bool &foundline
|
||||||
}
|
}
|
||||||
|
|
||||||
FLineOpening open;
|
FLineOpening open;
|
||||||
if (in->d.line->special == 0 || !(in->d.line->activation & (SPAC_Use|SPAC_UseThrough)))
|
if (in->d.line->special == 0 || !(in->d.line->activation & (SPAC_Use|SPAC_UseThrough|SPAC_UseBack)))
|
||||||
{
|
{
|
||||||
blocked:
|
blocked:
|
||||||
if (in->d.line->flags & (ML_BLOCKEVERYTHING|ML_BLOCKUSE))
|
if (in->d.line->flags & (ML_BLOCKEVERYTHING|ML_BLOCKUSE))
|
||||||
|
@ -4029,27 +4029,46 @@ bool P_UseTraverse(AActor *usething, fixed_t endx, fixed_t endy, bool &foundline
|
||||||
}
|
}
|
||||||
|
|
||||||
if (P_PointOnLineSide (usething->x, usething->y, in->d.line) == 1)
|
if (P_PointOnLineSide (usething->x, usething->y, in->d.line) == 1)
|
||||||
// [RH] continue traversal for two-sided lines
|
{
|
||||||
//return in->d.line->backsector != NULL; // don't use back side
|
if (!(in->d.line->activation & SPAC_UseBack))
|
||||||
goto blocked; // do a proper check for back sides of triggers
|
{
|
||||||
|
// [RH] continue traversal for two-sided lines
|
||||||
P_ActivateLine (in->d.line, usething, 0, SPAC_Use);
|
//return in->d.line->backsector != NULL; // don't use back side
|
||||||
|
goto blocked; // do a proper check for back sides of triggers
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
P_ActivateLine (in->d.line, usething, 1, SPAC_UseBack);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((in->d.line->activation & (SPAC_Use|SPAC_UseThrough|SPAC_UseBack)) == SPAC_UseBack)
|
||||||
|
{
|
||||||
|
goto blocked; // Line cannot be used from front side so treat it as a non-trigger line
|
||||||
|
}
|
||||||
|
|
||||||
|
P_ActivateLine (in->d.line, usething, 0, SPAC_Use);
|
||||||
|
|
||||||
|
//WAS can't use more than one special line in a row
|
||||||
|
//jff 3/21/98 NOW multiple use allowed with enabling line flag
|
||||||
|
//[RH] And now I've changed it again. If the line is of type
|
||||||
|
// SPAC_USE, then it eats the use. Everything else passes
|
||||||
|
// it through, including SPAC_USETHROUGH.
|
||||||
|
if (i_compatflags & COMPATF_USEBLOCKING)
|
||||||
|
{
|
||||||
|
if (in->d.line->activation & SPAC_UseThrough) continue;
|
||||||
|
else return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(in->d.line->activation & SPAC_Use)) continue;
|
||||||
|
else return true;
|
||||||
|
}
|
||||||
|
|
||||||
//WAS can't use more than one special line in a row
|
|
||||||
//jff 3/21/98 NOW multiple use allowed with enabling line flag
|
|
||||||
//[RH] And now I've changed it again. If the line is of type
|
|
||||||
// SPAC_USE, then it eats the use. Everything else passes
|
|
||||||
// it through, including SPAC_USETHROUGH.
|
|
||||||
if (i_compatflags & COMPATF_USEBLOCKING)
|
|
||||||
{
|
|
||||||
if (in->d.line->activation & SPAC_UseThrough) continue;
|
|
||||||
else return true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!(in->d.line->activation & SPAC_Use)) continue;
|
|
||||||
else return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
||||||
{
|
{
|
||||||
lineActivation |= SPAC_Cross|SPAC_MCross;
|
lineActivation |= SPAC_Cross|SPAC_MCross;
|
||||||
}
|
}
|
||||||
if (activationType == SPAC_Use)
|
if (activationType ==SPAC_Use || activationType == SPAC_UseBack)
|
||||||
{
|
{
|
||||||
if (!P_CheckSwitchRange(mo, line, side))
|
if (!P_CheckSwitchRange(mo, line, side))
|
||||||
{
|
{
|
||||||
|
|
|
@ -721,6 +721,10 @@ struct UDMFParser
|
||||||
Flag(ld->activation, SPAC_Use, key);
|
Flag(ld->activation, SPAC_Use, key);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
case NAME_Playeruseback:
|
||||||
|
Flag(ld->activation, SPAC_UseBack, key);
|
||||||
|
continue;
|
||||||
|
|
||||||
case NAME_Monstercross:
|
case NAME_Monstercross:
|
||||||
Flag(ld->activation, SPAC_MCross, key);
|
Flag(ld->activation, SPAC_MCross, key);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue