Don't intercept tactical and marine missiles targeting planes
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 12 Oct 2009 02:18:26 +0000 (22:18 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Dec 2009 07:13:29 +0000 (08:13 +0100)
commit22071b4edb0448bd5b3da73ca7c736315e785b68
treeeb06ceb1756f61a5c9913f68bfc11a9332b548e7
parentfd894d9864423e6a3241c84dbce67ec86880ee2d
Don't intercept tactical and marine missiles targeting planes

Missiles attacking ground targets (sectors, ships or land units) can
be intercepted, missiles targeting planes can't.  Except msl_launch()
checked the missile's capabilities instead of its target, and thus
intercepted missiles that *could* target ground even when they
targeted planes.

This broke the missile interception code's assumption that
interceptors aren't intercepted, and crashed the server through
infinite recursion: tactical abm #1 intercepts, tactical abm #2
intercepts #1, #1 intercepts #2, ...

Same bug in msl_hit() printed "incoming missile" for missiles that
could target ground but do target planes.

Broken in Empire 2.  Bug can't bite with the stock game's planes.
src/lib/subs/mslsub.c