Permalink
Browse files

mod: airstrike bomb are dropped with the same orientation as plane

  • Loading branch information...
Aranud committed Feb 11, 2019
1 parent 8b887a3 commit 386e0ddb47bb0811f6743e25135af7435038a50f
Showing with 4 additions and 19 deletions.
  1. +4 −19 src/game/g_weapon.c
@@ -2623,28 +2623,13 @@ void G_AirStrikeThink(gentity_t *ent)

VectorCopy(ent->r.currentAngles, angle);

angle[0] += 10 + crandom();
if (angle[0] >= 360)
{
angle[0] += 10 + crandom() * 10;
while (angle[0] > 180)
angle[0] -= 360;
}
else if (angle[0] < 0)
{
while (angle[0] < -180)
angle[0] += 360;
}

// drop the bomb horizontaly
angle[1] += 90 + crandom();
if (angle[1] >= 360)
{
angle[1] -= 360;
}
else if (angle[1] < 0)
{
angle[1] += 360;
}

bomb = fire_missile(ent, bomboffset, tv(0, 0, -750.f), ent->s.weapon);
bomb = fire_missile(ent, bomboffset, tv(0, 0, -750), ent->s.weapon);

bomb->s.apos.trType = TR_LINEAR;
bomb->s.apos.trTime = level.time;

0 comments on commit 386e0dd

Please sign in to comment.