]> git.pond.sub.org Git - empserver/commit
Fix and simplify check_trade()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 14 Sep 2008 15:12:45 +0000 (11:12 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 15 Sep 2008 23:40:43 +0000 (19:40 -0400)
commitb8ab065a6e9ce0564f6ff0def41af45648f7a8f3
treee11b4022ac104ebb643002c57358836d3f2bf1e8
parent8cf32c485443ff87287ff05ed3c4f8bbdae0d298
Fix and simplify check_trade()

Use unit_drop_cargo() to drop a sold land unit's cargo.

Use unit_give_away() to transfer ownership.  This fixes the following
bugs and misfeatures:

* Sold nuke wasn't taken off its plane.  Could not happen before
  commit 2e40a4bb, v4.3.3.

* Nuke on a plane wasn't sold along with the plane.  Broken in commit
  2e40a4bb, v4.3.3.

* Planes and land units on sold ships got their mobility zeroed.

* Planes on sold ships didn't get their wing reset.
src/lib/commands/trad.c