]> git.pond.sub.org Git - empserver/commit
Fix attack when attacking sector gets taken by ally
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 20 Jan 2011 06:49:44 +0000 (07:49 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2011 15:03:34 +0000 (16:03 +0100)
commit13d9057bd8c2d660f95dc226dfd9298bc87cabe0
tree006451d6fd2821e5a3c52e06e6ca40c15e82ea9e
parent16c68eb403356a1087cd94f1dc310f5b3c813005
Fix attack when attacking sector gets taken by ally

When an attacking sector got lost while the player was at a prompt,
and the new owner was allied to the player, the server got confused:

1. If the sector attacked with mil, the server let the ghost mil
attack, but not occupy.

2. If the sector was allied, the server reported the sector loss and
land units dropping out of the attack, but claimed the lost sector was
yours.

Fix 1. by dropping sectors from attack when they change owner away
from the player, regardless of relations.  Side effect: also drops any
surviving land units there.  Before, they dropped out only if the new
owner wasn't allied to the player.  That change's okay.

Fix 2. the obvious way: change the messages.

Broken in 4.0.0.
src/lib/subs/attsub.c