From 052c4d12ef163ff68d19afcd93a94ce0688ad9f8 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 16 May 2004 11:23:43 +0000 Subject: [PATCH] (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. --- src/lib/commands/expl.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/commands/expl.c b/src/lib/commands/expl.c index ed969086..40c332c7 100644 --- a/src/lib/commands/expl.c +++ b/src/lib/commands/expl.c @@ -71,8 +71,7 @@ explore(void) s_char buf[1024]; s_char prompt[128]; - if ((ip = - whatitem(player->argp[1], "explore with what? (civ/mil) ")) == 0) + if (!(ip = whatitem(player->argp[1], "explore with what? (civ/mil) "))) return RET_SYN; vtype = ip->i_vtype; if ((vtype != V_CIVIL) && (vtype != V_MILIT)) { @@ -232,9 +231,6 @@ explore(void) 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]; if (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); } putsect(§); + getsect(start.sct_x, start.sct_y, &start); + start.sct_flags &= ~MOVE_IN_PROGRESS; + putsect(&start); return RET_OK; }