]> git.pond.sub.org Git - empserver/commit
Fix bomb not to wipe out plane updates while asking for targets
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 Mar 2009 17:19:25 +0000 (18:19 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 Mar 2009 17:19:25 +0000 (18:19 +0100)
commitf07e6901cb63f3fc014fba6898d625850f7e5075
tree3064d50f2449966854fa6af002f5eadb94f26214
parentf10af4dea0778dad2df7e51ec52ee745977315a9
Fix bomb not to wipe out plane updates while asking for targets

The commands to fly planes read the planes into a plane list, and
write them back when they land.  If a plane changes in the file while
it is in that plane list, the changes get wiped out when the plane
lands, triggering a seqno oops.

This is not an issue as long as the complete sortie runs
uninterrupted, because that code takes care to update flying planes
only through the appropriate plane list.

However, the bomb command suspends the planes on a pinpoint bombing
run mid-air over the target sector to let the player choose targets.
This lets code run that *can* update flying planes, for instance the
edit command.

Fix by aborting changed planes, taking care not to clobber the
changes.
src/lib/commands/bomb.c