mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 02:21:47 +00:00
Add triple laser
This commit is contained in:
parent
82f00215ac
commit
0e14845155
1 changed files with 13 additions and 1 deletions
|
@ -2106,6 +2106,8 @@ void A_Boss7FireMissiles(mobj_t *actor)
|
||||||
// var2:
|
// var2:
|
||||||
// 0 - Boss 1 Left side
|
// 0 - Boss 1 Left side
|
||||||
// 1 - Boss 1 Right side
|
// 1 - Boss 1 Right side
|
||||||
|
// 2 - Triple laser
|
||||||
|
// >3 - Boss 1 Middle
|
||||||
//
|
//
|
||||||
void A_Boss1Laser(mobj_t *actor)
|
void A_Boss1Laser(mobj_t *actor)
|
||||||
{
|
{
|
||||||
|
@ -2141,6 +2143,15 @@ void A_Boss1Laser(mobj_t *actor)
|
||||||
else
|
else
|
||||||
z = actor->z + FixedMul(56*FRACUNIT, actor->scale);
|
z = actor->z + FixedMul(56*FRACUNIT, actor->scale);
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
var2 = 3; // Fire middle laser
|
||||||
|
A_Boss1Laser(actor);
|
||||||
|
var2 = 0; // Fire left laser
|
||||||
|
A_Boss1Laser(actor);
|
||||||
|
var2 = 1; // Fire right laser
|
||||||
|
A_Boss1Laser(actor);
|
||||||
|
return;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
x = actor->x;
|
x = actor->x;
|
||||||
y = actor->y;
|
y = actor->y;
|
||||||
|
@ -2148,7 +2159,7 @@ void A_Boss1Laser(mobj_t *actor)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(actor->flags2 & MF2_FIRING))
|
if (!(actor->flags2 & MF2_FIRING) && actor->tics > 1)
|
||||||
{
|
{
|
||||||
actor->angle = R_PointToAngle2(x, y, actor->target->x, actor->target->y);
|
actor->angle = R_PointToAngle2(x, y, actor->target->x, actor->target->y);
|
||||||
if (mobjinfo[locvar1].seesound)
|
if (mobjinfo[locvar1].seesound)
|
||||||
|
@ -2170,6 +2181,7 @@ void A_Boss1Laser(mobj_t *actor)
|
||||||
angle = FixedAngle(FixedDiv(actor->tics*160*FRACUNIT, actor->state->tics*FRACUNIT) + 10*FRACUNIT);
|
angle = FixedAngle(FixedDiv(actor->tics*160*FRACUNIT, actor->state->tics*FRACUNIT) + 10*FRACUNIT);
|
||||||
else
|
else
|
||||||
angle = R_PointToAngle2(z + (mobjinfo[locvar1].height>>1), 0, actor->target->z, R_PointToDist2(x, y, actor->target->x, actor->target->y));
|
angle = R_PointToAngle2(z + (mobjinfo[locvar1].height>>1), 0, actor->target->z, R_PointToDist2(x, y, actor->target->x, actor->target->y));
|
||||||
|
|
||||||
point = P_SpawnMobj(x, y, z, locvar1);
|
point = P_SpawnMobj(x, y, z, locvar1);
|
||||||
P_SetTarget(&point->target, actor);
|
P_SetTarget(&point->target, actor);
|
||||||
point->angle = actor->angle;
|
point->angle = actor->angle;
|
||||||
|
|
Loading…
Reference in a new issue