]> git.pond.sub.org Git - empserver/commit
Fix cargo giveaway in scrap and scuttle
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 02:06:44 +0000 (22:06 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Sep 2008 23:40:43 +0000 (19:40 -0400)
commitd2b1bef0f51959791d47e6fa1d80fd5191d224a2
treec2fead872245c4bf2c44e90d4f4f781848587f87
parentf3651f17e5d539d20c1433ecab23c754bfaeef54
Fix cargo giveaway in scrap and scuttle

When giving away cargo by scrapping or scuttling its carrier, the
cargo's cargo wasn't given away.  Happened for instance when a ship
carrying a land unit carrying a SAM got scrapped.

Also, wing, army and mission weren't cleared.

To fix, create unit_give_away() and use it in unit_drop_cargo().
include/unit.h
src/lib/subs/unitsub.c