mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
- fixed A_Chase default detection.
This commit is contained in:
parent
ed0dccdc1f
commit
a6d7d8755c
4 changed files with 17 additions and 4 deletions
|
@ -1034,3 +1034,10 @@ xx(RedCard)
|
|||
xx(BlueSkull)
|
||||
xx(YellowSkull)
|
||||
xx(RedSkull)
|
||||
xx(DynamicLight)
|
||||
xx(SpotInnerAngle)
|
||||
xx(SpotOuterAngle)
|
||||
xx(lightflags)
|
||||
xx(lighttype)
|
||||
xx(InternalDynamicLight)
|
||||
xx(_a_chase_default)
|
||||
|
|
|
@ -2769,12 +2769,16 @@ void A_Chase(AActor *self)
|
|||
DEFINE_ACTION_FUNCTION(AActor, A_Chase)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_STATE(melee);
|
||||
PARAM_STATE(missile);
|
||||
PARAM_STATELABEL(meleelabel);
|
||||
PARAM_STATELABEL(missilelabel);
|
||||
PARAM_INT(flags);
|
||||
|
||||
if (melee != nullptr || missile != nullptr || flags != 0x40000000)
|
||||
FName meleename = ENamedName(meleelabel - 0x10000000);
|
||||
FName missilename = ENamedName(missilelabel - 0x10000000);
|
||||
if (meleename != NAME__a_chase_default || missilename != NAME__a_chase_default)
|
||||
{
|
||||
FState *melee = StateLabels.GetState(meleelabel, self->GetClass());
|
||||
FState *missile = StateLabels.GetState(missilelabel, self->GetClass());
|
||||
if ((flags & CHF_RESURRECT) && P_CheckForResurrection(self, false))
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -513,6 +513,7 @@ bool AssertObject(void * ob);
|
|||
#define PARAM_ANGLE_AT(p,x) assert((p) < numparam); assert(reginfo[p] == REGT_FLOAT); DAngle x = param[p].f;
|
||||
#define PARAM_STRING_VAL_AT(p,x) assert((p) < numparam); assert(reginfo[p] == REGT_STRING); FString x = param[p].s();
|
||||
#define PARAM_STRING_AT(p,x) assert((p) < numparam); assert(reginfo[p] == REGT_STRING); const FString &x = param[p].s();
|
||||
#define PARAM_STATELABEL_AT(p,x) assert((p) < numparam); assert(reginfo[p] == REGT_INT); int x = param[p].i;
|
||||
#define PARAM_STATE_AT(p,x) assert((p) < numparam); assert(reginfo[p] == REGT_INT); FState *x = (FState *)StateLabels.GetState(param[p].i, self->GetClass());
|
||||
#define PARAM_STATE_ACTION_AT(p,x) assert((p) < numparam); assert(reginfo[p] == REGT_INT); FState *x = (FState *)StateLabels.GetState(param[p].i, stateowner->GetClass());
|
||||
#define PARAM_POINTER_AT(p,x,type) assert((p) < numparam); assert(reginfo[p] == REGT_POINTER); type *x = (type *)param[p].a;
|
||||
|
@ -538,6 +539,7 @@ bool AssertObject(void * ob);
|
|||
#define PARAM_ANGLE(x) ++paramnum; PARAM_ANGLE_AT(paramnum,x)
|
||||
#define PARAM_STRING(x) ++paramnum; PARAM_STRING_AT(paramnum,x)
|
||||
#define PARAM_STRING_VAL(x) ++paramnum; PARAM_STRING_VAL_AT(paramnum,x)
|
||||
#define PARAM_STATELABEL(x) ++paramnum; PARAM_STATELABEL_AT(paramnum,x)
|
||||
#define PARAM_STATE(x) ++paramnum; PARAM_STATE_AT(paramnum,x)
|
||||
#define PARAM_STATE_ACTION(x) ++paramnum; PARAM_STATE_ACTION_AT(paramnum,x)
|
||||
#define PARAM_POINTER(x,type) ++paramnum; PARAM_POINTER_AT(paramnum,x,type)
|
||||
|
|
|
@ -1018,7 +1018,7 @@ class Actor : Thinker native
|
|||
native void A_NoBlocking(bool drop = true);
|
||||
void A_Fall() { A_NoBlocking(); }
|
||||
native void A_Look();
|
||||
native void A_Chase(statelabel melee = null, statelabel missile = null, int flags = 0x40000000);
|
||||
native void A_Chase(statelabel melee = '_a_chase_default', statelabel missile = '_a_chase_default', int flags = 0);
|
||||
native void A_VileChase();
|
||||
native bool A_CheckForResurrection();
|
||||
native void A_BossDeath();
|
||||
|
|
Loading…
Reference in a new issue