sonar: Drop a redundant putship()
The old retreat_ship() took care not to put its ship argument (it still put other ships in a group retreat). Callers put it unconditionally to make the change to the ship permanent. The current retreat code puts all ships it changes, rendering sona()'s putship() redundant. Drop it. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
fff476ac4b
commit
32b611eb8d
1 changed files with 2 additions and 4 deletions
|
@ -29,7 +29,7 @@
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Jim Griffith, 1989
|
* Jim Griffith, 1989
|
||||||
* Ken Stevens, 1995
|
* Ken Stevens, 1995
|
||||||
* Markus Armbruster, 2004-2012
|
* Markus Armbruster, 2004-2015
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -162,10 +162,8 @@ sona(void)
|
||||||
"Sonar ping from %s detected by %s!\n",
|
"Sonar ping from %s detected by %s!\n",
|
||||||
xyas(ship.shp_x, ship.shp_y,
|
xyas(ship.shp_x, ship.shp_y,
|
||||||
targ.shp_own), prship(&targ));
|
targ.shp_own), prship(&targ));
|
||||||
if (targ.shp_rflags & RET_SONARED) {
|
if (targ.shp_rflags & RET_SONARED)
|
||||||
retreat_ship(&targ, targ.shp_own, 's');
|
retreat_ship(&targ, targ.shp_own, 's');
|
||||||
putship(targ.shp_uid, &targ);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (dist > vrange)
|
if (dist > vrange)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue