buddy_message_ignore_time: respect guidebot cage

Commit dc79bb8e4a intended to clean up processing guidebot messages,
but accidentally allowed the guidebot to report certain status messages
before its cage was opened.  Normal missions still do not report these
messages, but some custom levels do.

Reported-by: ziplantil <https://github.com/dxx-rebirth/dxx-rebirth/issues/438>
Fixes: dc79bb8e4a ("Remove hack for bypassing buddy time restriction")
This commit is contained in:
Kp 2019-07-28 21:09:07 +00:00
parent 635ae0b595
commit 445a734779

View file

@ -414,6 +414,8 @@ static void buddy_message_ignore_time(const char *const fmt, ...)
auto &BuddyState = LevelUniqueObjectState.BuddyState;
if (BuddyState.Buddy_messages_suppressed)
return;
if (!ok_for_buddy_to_talk())
return;
va_list args;
va_start(args, fmt);
buddy_message_force_va(fmt, args);