mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
Added CBF_NOACTORS to A_CheckBlock.
- Self explanatory, doesn't count actors as blocking them.
This commit is contained in:
parent
7f672039bf
commit
59ad6206de
2 changed files with 7 additions and 3 deletions
|
@ -6683,12 +6683,13 @@ The SET pointer flags only affect the caller, not the pointer.
|
|||
===========================================================================*/
|
||||
enum CBF
|
||||
{
|
||||
CBF_NOLINES = 1 << 0, //Don't check actors.
|
||||
CBF_NOLINES = 1 << 0, //Don't check lines.
|
||||
CBF_SETTARGET = 1 << 1, //Sets the caller/pointer's target to the actor blocking it. Actors only.
|
||||
CBF_SETMASTER = 1 << 2, //^ but with master.
|
||||
CBF_SETTRACER = 1 << 3, //^ but with tracer.
|
||||
CBF_SETONPTR = 1 << 4, //Sets the pointer change on the actor doing the checking instead of self.
|
||||
CBF_DROPOFF = 1 << 5, //Check for dropoffs.
|
||||
CBF_NOACTORS = 1 << 6, //Don't check actors.
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
|
||||
|
@ -6731,8 +6732,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CheckBlock)
|
|||
{
|
||||
ACTION_RETURN_STATE(NULL);
|
||||
}
|
||||
//[MC] Easiest way to tell if an actor is blocking it, use the pointers.
|
||||
if (mobj->BlockingMobj || (!(flags & CBF_NOLINES) && mobj->BlockingLine != NULL))
|
||||
//[MC] I don't know why I let myself be persuaded not to include a flag.
|
||||
//If an actor is loaded with pointers, they don't really have any options to spare.
|
||||
|
||||
if ((!(flags & CBF_NOACTORS) && (mobj->BlockingMobj)) || (!(flags & CBF_NOLINES) && mobj->BlockingLine != NULL))
|
||||
{
|
||||
ACTION_RETURN_STATE(block);
|
||||
}
|
||||
|
|
|
@ -526,6 +526,7 @@ enum
|
|||
CBF_SETTRACER = 1 << 3, //^ but with tracer.
|
||||
CBF_SETONPTR = 1 << 4, //Sets the pointer change on the actor doing the checking instead of self.
|
||||
CBF_DROPOFF = 1 << 5, //Check for dropoffs.
|
||||
CBF_NOACTORS = 1 << 6, //Don't check actors.
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
Loading…
Reference in a new issue