(shp_check_one_mines): Simplify slightly.
This commit is contained in:
parent
b8b243339f
commit
07015c3613
1 changed files with 1 additions and 3 deletions
|
@ -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, §);
|
getsect(mlp->ship.shp_x, mlp->ship.shp_y, §);
|
||||||
|
@ -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(§);
|
putsect(§);
|
||||||
putship(mlp->ship.shp_uid, &mlp->ship);
|
putship(mlp->ship.shp_uid, &mlp->ship);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue