mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 13:31:37 +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.
|
||||
|
@ -89,6 +89,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
alpha = <float>; // Translucency of this line, default is 1.0
|
||||
renderstyle = <string>; // Render style, can be "translucent" or "add",
|
||||
// default is "translucent".
|
||||
playeruseback = <bool>; // New SPAC flag, true = player can use from back side.
|
||||
anycross = <bool>; // New SPAC flag, true = any non-projectile
|
||||
// crossing will 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
|
||||
Changed node specifications to deprecate compression of node lump.
|
||||
|
||||
1.10 25.04.2010
|
||||
Added 'playeruseback' line trigger flag.
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
||||
|
|
|
@ -169,8 +169,9 @@ enum SPAC
|
|||
SPAC_AnyCross = 1<<7, // when anything without the MF2_TELEPORT flag crosses the line
|
||||
SPAC_MUse = 1<<8, // monsters can use
|
||||
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
|
||||
|
|
|
@ -386,6 +386,7 @@ xx(Repeatspecial)
|
|||
|
||||
xx(Playercross)
|
||||
xx(Playeruse)
|
||||
xx(Playeruseback)
|
||||
xx(Monstercross)
|
||||
xx(Impact)
|
||||
xx(Playerpush)
|
||||
|
|
|
@ -3983,7 +3983,7 @@ bool P_UseTraverse(AActor *usething, fixed_t endx, fixed_t endy, bool &foundline
|
|||
}
|
||||
|
||||
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:
|
||||
if (in->d.line->flags & (ML_BLOCKEVERYTHING|ML_BLOCKUSE))
|
||||
|
@ -4029,9 +4029,25 @@ 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 (!(in->d.line->activation & SPAC_UseBack))
|
||||
{
|
||||
// [RH] continue traversal for two-sided lines
|
||||
//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);
|
||||
|
||||
|
@ -4050,6 +4066,9 @@ bool P_UseTraverse(AActor *usething, fixed_t endx, fixed_t endy, bool &foundline
|
|||
if (!(in->d.line->activation & SPAC_Use)) continue;
|
||||
else return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ bool P_TestActivateLine (line_t *line, AActor *mo, int side, int activationType)
|
|||
{
|
||||
lineActivation |= SPAC_Cross|SPAC_MCross;
|
||||
}
|
||||
if (activationType == SPAC_Use)
|
||||
if (activationType ==SPAC_Use || activationType == SPAC_UseBack)
|
||||
{
|
||||
if (!P_CheckSwitchRange(mo, line, side))
|
||||
{
|
||||
|
|
|
@ -721,6 +721,10 @@ struct UDMFParser
|
|||
Flag(ld->activation, SPAC_Use, key);
|
||||
continue;
|
||||
|
||||
case NAME_Playeruseback:
|
||||
Flag(ld->activation, SPAC_UseBack, key);
|
||||
continue;
|
||||
|
||||
case NAME_Monstercross:
|
||||
Flag(ld->activation, SPAC_MCross, key);
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue