- scriptified A_FatAttack*.
- swapped parameters of two-parameter VelToAngle method, so that internal and script version are in line. - fixed parameter asserts to handle NULL pointers properly.
This commit is contained in:
parent
948ef62fcd
commit
c7347608a4
18 changed files with 152 additions and 154 deletions
|
|
@ -5838,7 +5838,7 @@ DEFINE_ACTION_FUNCTION(AActor, SpawnMissile)
|
|||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_OBJECT(dest, AActor);
|
||||
PARAM_CLASS(type, AActor);
|
||||
PARAM_OBJECT_OPT(owner, AActor) { owner = self; }
|
||||
PARAM_OBJECT_DEF(owner, AActor);
|
||||
ACTION_RETURN_OBJECT(P_SpawnMissile(self, dest, type, owner));
|
||||
}
|
||||
|
||||
|
|
@ -6584,6 +6584,31 @@ void AActor::SetTranslation(const char *trname)
|
|||
// silently ignore if the name does not exist, this would create some insane message spam otherwise.
|
||||
}
|
||||
|
||||
|
||||
// This combines all 3 variations of the internal function
|
||||
DEFINE_ACTION_FUNCTION(AActor, VelFromAngle)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
if (numparam == 1)
|
||||
{
|
||||
self->VelFromAngle();
|
||||
}
|
||||
else
|
||||
{
|
||||
PARAM_FLOAT(speed);
|
||||
if (numparam == 2)
|
||||
{
|
||||
self->VelFromAngle(speed);
|
||||
}
|
||||
else
|
||||
{
|
||||
PARAM_ANGLE(angle);
|
||||
self->VelFromAngle(speed, angle);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// DropItem handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue