Revert "commands: Always put ship or land unit before retreating it"

This reverts commit f4d8d64bb3.

Breaks retreat after ship got sunk by bombs or missile.

ship_bomb() and launch_missile() pass .shp_own to retreat_ship().
Wrong after putship(), because putship() resets the owner when the
ship got sunk.  retreat_ship() then oopses and fails to retreat the
surviving members of the group.

Other callers save the owner before putting the ship, and pass that.
We could change these two to do the same.  But since we're trying to
get a release out, simply revert the broken commit instead.
This commit is contained in:
Markus Armbruster 2015-05-17 18:11:20 +02:00
parent 1c9fb831ed
commit fff177be2f
4 changed files with 5 additions and 5 deletions

View file

@ -276,9 +276,9 @@ launch_missile(struct plnstr *pp)
shipdamage(&target_ship, dam);
if (target_ship.shp_effic < SHIP_MINEFF)
pr("%s sunk!\n", prship(&target_ship));
putship(target_ship.shp_uid, &target_ship);
if (dam && (target_ship.shp_rflags & RET_INJURED))
retreat_ship(&target_ship, target_ship.shp_own, 'i');
putship(target_ship.shp_uid, &target_ship);
}
return RET_OK;
}