mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- Added flags for A_CheckLOF:
- CLOFF_SETTARGET | CLOFF_SETMASTER | CLOFF_SETTRACER - An actor that causes A_CheckLOF (and only an actor) to succeed will set the intercepting actor as its target, master, and/or tracer, respectively.
This commit is contained in:
parent
b6c5cfb9ef
commit
465d9ab89a
2 changed files with 38 additions and 23 deletions
|
@ -3071,37 +3071,41 @@ DEFINE_ACTION_FUNCTION(AActor, A_ClearTarget)
|
||||||
|
|
||||||
enum CLOF_flags
|
enum CLOF_flags
|
||||||
{
|
{
|
||||||
CLOFF_NOAIM_VERT = 0x1,
|
CLOFF_NOAIM_VERT = 0x00000001,
|
||||||
CLOFF_NOAIM_HORZ = 0x2,
|
CLOFF_NOAIM_HORZ = 0x00000002,
|
||||||
|
|
||||||
CLOFF_JUMPENEMY = 0x4,
|
CLOFF_JUMPENEMY = 0x00000004,
|
||||||
CLOFF_JUMPFRIEND = 0x8,
|
CLOFF_JUMPFRIEND = 0x00000008,
|
||||||
CLOFF_JUMPOBJECT = 0x10,
|
CLOFF_JUMPOBJECT = 0x00000010,
|
||||||
CLOFF_JUMPNONHOSTILE = 0x20,
|
CLOFF_JUMPNONHOSTILE = 0x00000020,
|
||||||
|
|
||||||
CLOFF_SKIPENEMY = 0x40,
|
CLOFF_SKIPENEMY = 0x00000040,
|
||||||
CLOFF_SKIPFRIEND = 0x80,
|
CLOFF_SKIPFRIEND = 0x00000080,
|
||||||
CLOFF_SKIPOBJECT = 0x100,
|
CLOFF_SKIPOBJECT = 0x00000100,
|
||||||
CLOFF_SKIPNONHOSTILE = 0x200,
|
CLOFF_SKIPNONHOSTILE = 0x00000200,
|
||||||
|
|
||||||
CLOFF_MUSTBESHOOTABLE = 0x400,
|
CLOFF_MUSTBESHOOTABLE = 0x00000400,
|
||||||
|
|
||||||
CLOFF_SKIPTARGET = 0x800,
|
CLOFF_SKIPTARGET = 0x00000800,
|
||||||
CLOFF_ALLOWNULL = 0x1000,
|
CLOFF_ALLOWNULL = 0x00001000,
|
||||||
CLOFF_CHECKPARTIAL = 0x2000,
|
CLOFF_CHECKPARTIAL = 0x00002000,
|
||||||
|
|
||||||
CLOFF_MUSTBEGHOST = 0x4000,
|
CLOFF_MUSTBEGHOST = 0x00004000,
|
||||||
CLOFF_IGNOREGHOST = 0x8000,
|
CLOFF_IGNOREGHOST = 0x00008000,
|
||||||
|
|
||||||
CLOFF_MUSTBESOLID = 0x10000,
|
CLOFF_MUSTBESOLID = 0x00010000,
|
||||||
CLOFF_BEYONDTARGET = 0x20000,
|
CLOFF_BEYONDTARGET = 0x00020000,
|
||||||
|
|
||||||
CLOFF_FROMBASE = 0x40000,
|
CLOFF_FROMBASE = 0x00040000,
|
||||||
CLOFF_MUL_HEIGHT = 0x80000,
|
CLOFF_MUL_HEIGHT = 0x00080000,
|
||||||
CLOFF_MUL_WIDTH = 0x100000,
|
CLOFF_MUL_WIDTH = 0x00100000,
|
||||||
|
|
||||||
CLOFF_JUMP_ON_MISS = 0x200000,
|
CLOFF_JUMP_ON_MISS = 0x00200000,
|
||||||
CLOFF_AIM_VERT_NOOFFSET = 0x400000,
|
CLOFF_AIM_VERT_NOOFFSET = 0x00400000,
|
||||||
|
|
||||||
|
CLOFF_SETTARGET = 0x00800000,
|
||||||
|
CLOFF_SETMASTER = 0x01000000,
|
||||||
|
CLOFF_SETTRACER = 0x02000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LOFData
|
struct LOFData
|
||||||
|
@ -3341,6 +3345,13 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckLOF)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ((trace.HitType == TRACE_HitActor) && (trace.Actor != NULL) && !(lof_data.BadActor))
|
||||||
|
{
|
||||||
|
if (flags & (CLOFF_SETTARGET)) self->target = trace.Actor;
|
||||||
|
if (flags & (CLOFF_SETMASTER)) self->master = trace.Actor;
|
||||||
|
if (flags & (CLOFF_SETTRACER)) self->tracer = trace.Actor;
|
||||||
|
}
|
||||||
|
|
||||||
ACTION_JUMP(jump);
|
ACTION_JUMP(jump);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,6 +372,10 @@ enum
|
||||||
CLOFF_JUMP_ON_MISS = 0x200000,
|
CLOFF_JUMP_ON_MISS = 0x200000,
|
||||||
CLOFF_AIM_VERT_NOOFFSET = 0x400000,
|
CLOFF_AIM_VERT_NOOFFSET = 0x400000,
|
||||||
|
|
||||||
|
CLOFF_SETTARGET = 0x800000,
|
||||||
|
CLOFF_SETMASTER = 0x1000000,
|
||||||
|
CLOFF_SETTRACER = 0x2000000,
|
||||||
|
|
||||||
CLOFF_SKIPOBSTACLES = CLOFF_SKIPENEMY|CLOFF_SKIPFRIEND|CLOFF_SKIPOBJECT|CLOFF_SKIPNONHOSTILE,
|
CLOFF_SKIPOBSTACLES = CLOFF_SKIPENEMY|CLOFF_SKIPFRIEND|CLOFF_SKIPOBJECT|CLOFF_SKIPNONHOSTILE,
|
||||||
CLOFF_NOAIM = CLOFF_NOAIM_VERT|CLOFF_NOAIM_HORZ
|
CLOFF_NOAIM = CLOFF_NOAIM_VERT|CLOFF_NOAIM_HORZ
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue