fragglet / sdl-sopwith

Classic bi-plane shoot-'em up
https://fragglet.github.io/sdl-sopwith
GNU General Public License v2.0
66 stars 13 forks source link

Ground targets only shoot at player 1 #28

Closed fragglet closed 4 months ago

fragglet commented 7 months ago

See here: https://github.com/fragglet/sdl-sopwith/blob/ea5b00ae3d16f990cc42b0a5e971dd3b4d2f96d3/src/swmove.c#L859

After the first level, the game is made more difficult by having the ground targets shoot back at enemy planes. But the logic only targets the first plane on the level (player 1, the cyan player). This should instead be searching through the object list to find any enemy planes that are in range.