Code: Select all
bool A_FireFragment(Class<Actor> projectile, double angleRange = 360, double vrange = 90, int numRays = 60, double distance = 512)
{
for (int i = 0; i < numRays; i++)
{
FTranslatedLineTarget t;
double an = angleRange/numRays * i;
double pitch = self.AimLineAttack(an, distance, t, vrange);
if (t.linetarget != null && t.lineTarget != target)
{
vector3 offset = Vec3Offset(0, 0, 0);
SpawnMissileXYZ(offset, t.lineTarget, projectile, true, target);
return true;
}
}
return false;
}