]> git.pond.sub.org Git - empserver/commit
Fix interdiction not to wipe out target ship updates
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 20 Mar 2010 16:55:56 +0000 (17:55 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 20 Mar 2010 17:44:45 +0000 (18:44 +0100)
commit1d4fea32b845686163b9be79e21ca7ea279357e1
tree290863e3780bfd7230e7b638608baa3396d0b6f6
parent28cc236e1264d57a06dfb89cf43a600ba88d271c
Fix interdiction not to wipe out target ship updates

Ships can expend shells to defend against missiles, in
shp_missile_defense().  Any shell use by the target ship got wiped out
when shp_missile_interdiction() wrote back the target ship, triggering
a seqno mismatch oops.

Ships get updated when they launch planes to intercept interdicting
planes, in mission_pln_equip().  Any petrol use by the target ship got
wiped out when shp_mission_interdiction() wrote back the target ship,
triggering a seqno mismatch oops.

Fix by re-reading the target ship in shp_damage_one().  This also
affects shp_fort_interdiction(), where it is not necessary.  A bit
inefficient, but let's keep this fix simple.
src/lib/subs/shpsub.c