]> git.pond.sub.org Git - empserver/commit
update/revolt: Fix guerrilla liberating old-owned sector
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 18 Sep 2016 17:02:47 +0000 (19:02 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:19 +0000 (20:09 +0200)
commit2315b50e52885b470dac586218e1c60eebb0ff1a
tree898de4b98c91abe73d5837c198ffcfafaa6ca576
parent025e9cc258812fce4054bee2cc5d87431ef3de88
update/revolt: Fix guerrilla liberating old-owned sector

Guerrilla are created loyal to the old owner.  When the sector
converts, they switch their allegiance to POGO.  This is a bit of a
hack.

When guerrilla win their fight for freedom in an old-owned sector, the
old-owner duly changes to POGO.  However, the owner doesn't.  Broken
in 4.2.6.  The "Sector X,Y has been retaken!" message is still sent to
the "new" sector owner.

Simply restoring the owner change lost back then would restore a bug
that goes back to 2.3.7: takeover() doesn't run when an old-owned
sector is liberated.  So fix the bug by making that unconditional.

Land units reported captured are actually destroyed, because POGO
can't own any.  Oh well.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/update/revolt.c
tests/update/99-POGO
tests/update/final.xdump
tests/update/journal.log