(shp_check_one_mines): Simplify slightly.

This commit is contained in:
Markus Armbruster 2006-03-27 21:43:21 +00:00
parent b8b243339f
commit 07015c3613

View file

@ -279,7 +279,6 @@ static int
shp_check_one_mines(struct mlist *mlp) shp_check_one_mines(struct mlist *mlp)
{ {
struct sctstr sect; struct sctstr sect;
int changed = 0;
int actor; int actor;
getsect(mlp->ship.shp_x, mlp->ship.shp_y, &sect); getsect(mlp->ship.shp_x, mlp->ship.shp_y, &sect);
@ -291,8 +290,7 @@ shp_check_one_mines(struct mlist *mlp)
actor = mlp->ship.shp_own; actor = mlp->ship.shp_own;
shp_hit_mine(&mlp->ship, mlp->mcp); shp_hit_mine(&mlp->ship, mlp->mcp);
sect.sct_mines--; sect.sct_mines--;
changed |= map_set(actor, sect.sct_x, sect.sct_y, 'X', 0); if (map_set(actor, sect.sct_x, sect.sct_y, 'X', 0))
if (changed)
writemap(actor); writemap(actor);
putsect(&sect); putsect(&sect);
putship(mlp->ship.shp_uid, &mlp->ship); putship(mlp->ship.shp_uid, &mlp->ship);