Exports P_ActivateLine to ZScript (along with constants for activation type)

This commit is contained in:
Mari the Deer 2018-04-07 16:58:30 +02:00 committed by Christoph Oelckers
commit 5d0ff4c8ba
3 changed files with 39 additions and 0 deletions

View file

@ -242,6 +242,26 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVe
return true;
}
DEFINE_ACTION_FUNCTION(_Line, Activate)
{
PARAM_SELF_PROLOGUE(line_t);
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
{
DVector3 optpos = DVector3(optx, opty, optz);
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, &optpos));
}
}
//============================================================================
//
// P_TestActivateLine