mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Separated P_ActivateLine ZScript export into two functions, one with and one without a vector parameter.
This commit is contained in:
parent
5d0ff4c8ba
commit
08f3afab0b
2 changed files with 16 additions and 13 deletions
|
@ -248,18 +248,20 @@ DEFINE_ACTION_FUNCTION(_Line, Activate)
|
||||||
PARAM_POINTER(mo, AActor);
|
PARAM_POINTER(mo, AActor);
|
||||||
PARAM_INT(side);
|
PARAM_INT(side);
|
||||||
PARAM_INT(activationType);
|
PARAM_INT(activationType);
|
||||||
PARAM_FLOAT_DEF(optx);
|
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, NULL));
|
||||||
PARAM_FLOAT_DEF(opty);
|
}
|
||||||
PARAM_FLOAT_DEF(optz);
|
|
||||||
if ( optx == opty == optz == NAN )
|
DEFINE_ACTION_FUNCTION(_Line, RemoteActivate)
|
||||||
{
|
{
|
||||||
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, NULL));
|
PARAM_SELF_PROLOGUE(line_t);
|
||||||
}
|
PARAM_POINTER(mo, AActor);
|
||||||
else
|
PARAM_INT(side);
|
||||||
{
|
PARAM_INT(activationType);
|
||||||
DVector3 optpos = DVector3(optx, opty, optz);
|
PARAM_FLOAT(optx);
|
||||||
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, &optpos));
|
PARAM_FLOAT(opty);
|
||||||
}
|
PARAM_FLOAT(optz);
|
||||||
|
DVector3 optpos = DVector3(optx, opty, optz);
|
||||||
|
ACTION_RETURN_BOOL(P_ActivateLine(self, mo, side, activationType, &optpos));
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
|
@ -156,7 +156,8 @@ struct Line native play
|
||||||
native Line getPortalDestination();
|
native Line getPortalDestination();
|
||||||
native int getPortalAlignment();
|
native int getPortalAlignment();
|
||||||
native int Index();
|
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)
|
int GetUDMFInt(Name nm)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue