Added WARPF_USETID to A_Warp

This commit is contained in:
Benjamin Moir 2015-07-31 22:24:01 +09:30
parent 701fc374f7
commit efce2a200c
3 changed files with 13 additions and 2 deletions

View file

@ -197,6 +197,7 @@ enum WARPF
WARPF_BOB = 0x800,
WARPF_MOVEPTR = 0x1000,
WARPF_USEPTR = 0x2000,
WARPF_USETID = 0x2000,
};

View file

@ -4664,8 +4664,17 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Warp)
ACTION_PARAM_ANGLE(angle, 4);
ACTION_PARAM_INT(flags, 5);
ACTION_PARAM_STATE(success_state, 6);
AActor *reference = COPY_AAPTR(self, destination_selector);
AActor *reference;
if((flags & WARPF_USETID))
{
reference = SingleActorFromTID(destination_selector, self);
}
else
{
reference = COPY_AAPTR(self, destination_selector);
}
//If there is no actor to warp to, fail.
if (!reference)

View file

@ -357,6 +357,7 @@ Const Int WAPRF_ABSOLUTEPOSITION = 0x400;
Const Int WARPF_ABSOLUTEPOSITION = 0x400;
Const Int WARPF_BOB = 0x800;
Const Int WARPF_MOVEPTR = 0x1000;
Const Int WARPF_USETID = 0x2000;
// flags for A_SetPitch/SetAngle/SetRoll
const int SPF_FORCECLAMP = 1;