- scriptified a_alienspectres.cpp.
This commit is contained in:
parent
7ea9f60464
commit
b171d6e21f
14 changed files with 253 additions and 257 deletions
|
|
@ -6554,6 +6554,48 @@ DEFINE_ACTION_FUNCTION(AActor, SpawnMissileAngleZSpeed)
|
|||
ACTION_RETURN_OBJECT(P_SpawnMissileAngleZSpeed(self, z, type, angle, vz, speed, owner, checkspawn));
|
||||
}
|
||||
|
||||
|
||||
AActor *P_SpawnSubMissile(AActor *source, PClassActor *type, AActor *target)
|
||||
{
|
||||
AActor *other = Spawn(type, source->Pos(), ALLOW_REPLACE);
|
||||
|
||||
if (other == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
other->target = target;
|
||||
other->Angles.Yaw = source->Angles.Yaw;
|
||||
other->VelFromAngle();
|
||||
|
||||
if (other->flags4 & MF4_SPECTRAL)
|
||||
{
|
||||
if (source->flags & MF_MISSILE && source->flags4 & MF4_SPECTRAL)
|
||||
{
|
||||
other->FriendPlayer = source->FriendPlayer;
|
||||
}
|
||||
else
|
||||
{
|
||||
other->SetFriendPlayer(target->player);
|
||||
}
|
||||
}
|
||||
|
||||
if (P_CheckMissileSpawn(other, source->radius))
|
||||
{
|
||||
DAngle pitch = P_AimLineAttack(source, source->Angles.Yaw, 1024.);
|
||||
other->Vel.Z = -other->Speed * pitch.Sin();
|
||||
return other;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, SpawnSubMissile)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_CLASS(cls, AActor);
|
||||
PARAM_OBJECT(target, AActor);
|
||||
ACTION_RETURN_OBJECT(P_SpawnSubMissile(self, cls, target));
|
||||
}
|
||||
/*
|
||||
================
|
||||
=
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue