Skip to content

Commit

Permalink
Merge pull request scp-fs2open#5953 from Goober5000/fix_fire_at_coords
Browse files Browse the repository at this point in the history
fix crash in fire-beam-at-coordinates
  • Loading branch information
Goober5000 committed Jan 23, 2024
2 parents 1d2ca8e + 14bba9a commit 7283412
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/weapon/beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2869,8 +2869,10 @@ void beam_aim(beam *b)
b->subsys->shared_fire_direction_beam_objnum = b->objnum;
}

// after pointing, jitter based on shot_aim
beam_jitter_aim(b, b->binfo.shot_aim[b->shot_index]);
// after pointing, jitter based on shot_aim (if we have a target object)
if (!(b->flags & BF_TARGETING_COORDS)) {
beam_jitter_aim(b, b->binfo.shot_aim[b->shot_index]);
}
}
break;

Expand Down

0 comments on commit 7283412

Please sign in to comment.