fix #H4028 - ':' sometimes doesn't work
User had MSGTTYPE=norep "You see here" and complained that once the message had been given while walking over an object, using ':' to intentionally look at something would end up doing nothing if its feedback was a repeat of "You see here". Trying to classify which actions should deliberately override no-repeat (or no-show) will be an ordeal. This fixes the case for the ':' command where the user obviously expects feedback. I think it could be done better but am settling for something quick and easy.
This commit is contained in:
+19
-2
@@ -87,9 +87,26 @@ VA_DECL(const char *, line)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Normally the sequence is
|
||||
* caller: pline("some message");
|
||||
* pline: vsprintf + putstr + iflags.last_msg = PLNMSG_UNKNOWN;
|
||||
* caller: iflags.last_msg = PLNMSG_some_message;
|
||||
* and subsequent code can adjust the next message if it is
|
||||
* affected by some_message.
|
||||
*
|
||||
* But some callers can use last_msg to control handling of next
|
||||
* message
|
||||
* caller: iflags.last_msg = PLNMSG_NOREP_OVERRIDE;
|
||||
* caller: pline("another message");
|
||||
* to force another_message to be delivered even if is a repeat
|
||||
* and user's MSGTYPE settings have classified it as don't-repeat.
|
||||
*/
|
||||
|
||||
msgtyp = msgtype_type(line, no_repeat);
|
||||
if (msgtyp == MSGTYP_NOSHOW
|
||||
|| (msgtyp == MSGTYP_NOREP && !strcmp(line, prevmsg)))
|
||||
if ((msgtyp == MSGTYP_NOSHOW && iflags.last_msg != PLNMSG_NOSHO_OVERRIDE)
|
||||
|| (msgtyp == MSGTYP_NOREP && iflags.last_msg != PLNMSG_NOREP_OVERRIDE
|
||||
&& !strcmp(line, prevmsg)))
|
||||
return;
|
||||
if (vision_full_recalc)
|
||||
vision_recalc(0);
|
||||
|
||||
Reference in New Issue
Block a user