Separated P_ActivateLine ZScript export into two functions, one with and one without a vector parameter.

This commit is contained in:
Marisa Kirisame 2018-04-07 17:08:23 +02:00 committed by Christoph Oelckers
parent 5d0ff4c8ba
commit 08f3afab0b
2 changed files with 16 additions and 13 deletions

View file

@ -248,19 +248,21 @@ DEFINE_ACTION_FUNCTION(_Line, Activate)
PARAM_POINTER(mo, AActor);
PARAM_INT(side);
PARAM_INT(activationType);
PARAM_FLOAT_DEF(optx);
PARAM_FLOAT_DEF(opty);
PARAM_FLOAT_DEF(optz);
if ( optx == opty == optz == NAN )
{
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, NULL));
}
else
DEFINE_ACTION_FUNCTION(_Line, RemoteActivate)
{
PARAM_SELF_PROLOGUE(line_t);
PARAM_POINTER(mo, AActor);
PARAM_INT(side);
PARAM_INT(activationType);
PARAM_FLOAT(optx);
PARAM_FLOAT(opty);
PARAM_FLOAT(optz);
DVector3 optpos = DVector3(optx, opty, optz);
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, &optpos));
}
}
//============================================================================
//

View file

@ -156,7 +156,8 @@ struct Line native play
native Line getPortalDestination();
native int getPortalAlignment();
native int Index();
native bool Activate(Actor activator, int side, int type, Vector3 pos = (double.nan, double.nan, double.nan));
native bool Activate(Actor activator, int side, int type);
native bool RemoteActivate(Actor activator, int side, int type, Vector3 pos);
int GetUDMFInt(Name nm)
{