fix issue #339 - duplicate feature messages

while 'mention_decor' is enabled.  When stepping onto different
terrain and one or more objects remained on the new spot after
autopickup, describe_decor() was issuing its new-terrain message
right before look_here()'s similar under-the-objects message.  If
autopickup grabbed everything or there weren't any objects to begin
with, look_here() doesn't issue any dfeature (terrain) message.
describe_decor() isn't smart enought to know whether that is going
to happen.  Give look_here() a new flag argument so that its caller
can ask for the dfeature message to be skipped for the case where a
similar message has already been given.
This commit is contained in:
PatR
2020-04-27 04:25:26 -07:00
parent 42ffce0e5d
commit 09f9b3598f
6 changed files with 48 additions and 57 deletions

View File

@@ -737,18 +737,8 @@ nh_timeout()
incr_itimeout(&HFumbling, rnd(20));
if (iflags.defer_decor) {
/*
* describe_decor() is attempting to work around a
* message sequencing issue: avoid
* |You are back on floor.
* |You trip over <object>.
* if the trip is being caused by moving on ice
* that the hero just left. A trip message has
* just been given, now give change-in-terrain one.
* Operate this way even for non-ice Fumbling so
* that describe_decor() doesn't need to know any
* details about that.
*/
/* 'mention_decor' was deferred for message sequencing
reasons; catch up now */
deferred_decor(FALSE);
}
break;