]> git.pond.sub.org Git - empserver/commit
Fix flying commands not to let planes do double duty as escorts hvy-metal-2.7
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Jun 2008 15:24:43 +0000 (11:24 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 28 Jun 2008 17:07:52 +0000 (13:07 -0400)
commit84d40a6057a4f858f5a7bef7bb7c73b4614128f3
treeca56a3d022ae5eaa81346d3404cd4c6f6b15ffd0
parentfbefc139f4fe6b9ba6068d6493a900f7b7d77b22
Fix flying commands not to let planes do double duty as escorts

Commit 7ca4f412 (v4.3.12) marked planes flying a sortie with
PLN_LAUNCHED, and made pln_arm() reject planes with that flag set.
This was designed to reject escorts that were already flying as
bombers.  It didn't work, because the test for PLN_LAUNCHED used a
stale copy of the plane created by pln_sel().  Fix by getting a fresh
copy.

The bug always existed, but the botched fix in commit 7ca4f412 made it
worse.  Before, ac_encounter() dropped escorts that were also bombers,
so the bug merely wasted plane fuel.  After, such planes were
effectively duplicated, and damage to one of them, usually the bomber,
was wiped out.  Abusable.
(cherry picked from commit 801780043fd2629b0859013d12caada2e8060688)
src/lib/subs/plnsub.c