(explore): Clear start sector's MOVE_IN_PROGRESS after updating end
sector. Otherwise, clearing MOVE_IN_PROGRESS can abandon the start sector when it shouldn't, leading to bogus records in the `lost' file. Closes #931184.
This commit is contained in:
parent
d7e3eb9c97
commit
052c4d12ef
1 changed files with 4 additions and 5 deletions
|
@ -71,8 +71,7 @@ explore(void)
|
||||||
s_char buf[1024];
|
s_char buf[1024];
|
||||||
s_char prompt[128];
|
s_char prompt[128];
|
||||||
|
|
||||||
if ((ip =
|
if (!(ip = whatitem(player->argp[1], "explore with what? (civ/mil) ")))
|
||||||
whatitem(player->argp[1], "explore with what? (civ/mil) ")) == 0)
|
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
vtype = ip->i_vtype;
|
vtype = ip->i_vtype;
|
||||||
if ((vtype != V_CIVIL) && (vtype != V_MILIT)) {
|
if ((vtype != V_CIVIL) && (vtype != V_MILIT)) {
|
||||||
|
@ -232,9 +231,6 @@ explore(void)
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getsect(start.sct_x, start.sct_y, &start);
|
|
||||||
start.sct_flags &= ~MOVE_IN_PROGRESS;
|
|
||||||
putsect(&start);
|
|
||||||
amt_dst = sect.sct_item[vtype];
|
amt_dst = sect.sct_item[vtype];
|
||||||
if (amount > ITEM_MAX - amt_dst) {
|
if (amount > ITEM_MAX - amt_dst) {
|
||||||
amount = ITEM_MAX - amt_dst;
|
amount = ITEM_MAX - amt_dst;
|
||||||
|
@ -267,6 +263,9 @@ explore(void)
|
||||||
= (amt_dst * sect.sct_work + amount * work) / (amt_dst + amount);
|
= (amt_dst * sect.sct_work + amount * work) / (amt_dst + amount);
|
||||||
}
|
}
|
||||||
putsect(§);
|
putsect(§);
|
||||||
|
getsect(start.sct_x, start.sct_y, &start);
|
||||||
|
start.sct_flags &= ~MOVE_IN_PROGRESS;
|
||||||
|
putsect(&start);
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue