// Function: A_BrakFireShot
//
// Description: Shoot an object at your target, offset to match where Brak's gun is.
// Also, sets Brak's reaction time; behaves normally otherwise.
//
// var1 = object # to shoot
// var2 = unused
//
void A_BrakFireShot(mobj_t *actor)
{
fixed_t x, y, z;
INT32 locvar1 = var1;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_BrakFireShot", actor))
return;
#endif
if (!actor->target)
return;
A_FaceTarget(actor);
x = actor->x
+ P_ReturnThrustX(actor, actor->angle, FixedMul(64*FRACUNIT, actor->scale))
+ P_ReturnThrustX(actor, actor->angle+ANGLE_270, FixedMul(32*FRACUNIT, actor->scale));
y = actor->y
+ P_ReturnThrustY(actor, actor->angle, FixedMul(64*FRACUNIT, actor->scale))
+ P_ReturnThrustY(actor, actor->angle+ANGLE_270, FixedMul(32*FRACUNIT, actor->scale));
if (actor->eflags & MFE_VERTICALFLIP)
z = actor->z + actor->height - FixedMul(144*FRACUNIT, actor->scale);
else
z = actor->z + FixedMul(144*FRACUNIT, actor->scale);
P_SpawnXYZMissile(actor, actor->target, locvar1, x, y, z);
if (!(actor->flags & MF_BOSS))
{
if (ultimatemode)
actor->reactiontime = actor->info->reactiontime*TICRATE;
else
actor->reactiontime = actor->info->reactiontime*TICRATE*2;
}
}