mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 09:11:17 +00:00
- preparation for making Trace portal aware: Added a new flag Trace_PortalRestrict, so that I could disable portals without static offset for P_LinePickActor and A_CheckLOF, because both depend on the target info being retainable which requires a static offset.
This commit is contained in:
parent
3c2ed52442
commit
81b634a798
3 changed files with 3 additions and 2 deletions
|
@ -4460,7 +4460,7 @@ AActor *P_LinePickActor(AActor *t1, angle_t angle, fixed_t distance, int pitch,
|
|||
TData.hitGhosts = true;
|
||||
|
||||
if (Trace(t1->X(), t1->Y(), shootz, t1->Sector, vx, vy, vz, distance,
|
||||
actorMask, wallMask, t1, trace, TRACE_NoSky, CheckForActor, &TData))
|
||||
actorMask, wallMask, t1, trace, TRACE_NoSky | TRACE_PortalRestrict, CheckForActor, &TData))
|
||||
{
|
||||
if (trace.HitType == TRACE_HitActor)
|
||||
{
|
||||
|
|
|
@ -84,6 +84,7 @@ enum
|
|||
TRACE_NoSky = 1, // Hitting the sky returns TRACE_HitNone
|
||||
TRACE_PCross = 2, // Trigger SPAC_PCROSS lines
|
||||
TRACE_Impact = 4, // Trigger SPAC_IMPACT lines
|
||||
TRACE_PortalRestrict= 8, // Cannot go through portals without a static link offset.
|
||||
};
|
||||
|
||||
// return values from callback
|
||||
|
|
|
@ -3870,7 +3870,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckLOF)
|
|||
lof_data.Flags = flags;
|
||||
lof_data.BadActor = false;
|
||||
|
||||
Trace(pos.x, pos.y, pos.z, sec, vx, vy, vz, range, ActorFlags::FromInt(0xFFFFFFFF), ML_BLOCKEVERYTHING, self, trace, 0,
|
||||
Trace(pos.x, pos.y, pos.z, sec, vx, vy, vz, range, ActorFlags::FromInt(0xFFFFFFFF), ML_BLOCKEVERYTHING, self, trace, TRACE_PortalRestrict,
|
||||
CheckLOFTraceFunc, &lof_data);
|
||||
|
||||
if (trace.HitType == TRACE_HitActor ||
|
||||
|
|
Loading…
Reference in a new issue