|
This article is a stub. It already has some of the necessary information on this topic, but it could be expanded upon. You can help the SRB2 Wiki and its users by expanding it!
|
A_CheckFlags2 is an action used to check the secondary flags of an object, and go to another state if the flag(s) are on.
Attributes |
Use
|
Var1 |
The flags to check, e.g. MF2_AMBUSH . This can contain multiple flags.
|
Var2 |
The state to jump to if any of the flags are on.
|
Code – A_CheckFlags2
|
|
// Function: A_CheckFlags2
//
// Description: If actor->flags2 & var1, goto var2.
//
// var1 = mask
// var2 = state to go
//
void A_CheckFlags2(mobj_t *actor)
{
INT32 locvar1 = var1;
INT32 locvar2 = var2;
if (LUA_CallAction(A_CHECKFLAGS2, actor))
return;
if (actor->flags2 & locvar1)
P_SetMobjState(actor, (statenum_t)locvar2);
}
|
|