Skip to content

Commit

Permalink
Don't have fighter bays do inArc checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Dec 14, 2023
1 parent dd43b6c commit 918cf70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pilot_weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ static int pilot_weapSetFire( Pilot *p, PilotWeaponSet *ws, int level )
if ((level != -1) && (ws->slots[i].level != level))
continue;

/* Only weapons, TODO probably better check. */
if (pos->sslot->slot.type!=OUTFIT_SLOT_WEAPON)
/* Only weapons. */
if (!outfit_isWeapon(o))
continue;

/* Only run once for each weapon type in the group if not volley. */
Expand Down Expand Up @@ -121,7 +121,7 @@ static int pilot_weapSetFire( Pilot *p, PilotWeaponSet *ws, int level )

/* Only "inrange" outfits.
* XXX for simplicity we are using pilot position / velocity instead of mount point, which might be a bit off. */
if (ws->inrange && ((outfit_duration(o)<time) ||
if (ws->inrange && !outfit_isFighterBay(o) && ((outfit_duration(o)<time) ||
(!weapon_inArc( o, p, &wt, &p->solid.pos, &p->solid.vel, p->solid.dir, time))))
continue;

Expand Down

0 comments on commit 918cf70

Please sign in to comment.