Skip to content

Commit

Permalink
Always use modern method to clear game messages
Browse files Browse the repository at this point in the history
This fixes a message draw glitch when finishing an episode, returning to menu with a demo playing in the background, and starting a new episode
  • Loading branch information
tmyqlfpir authored and Hendricks266 committed Feb 14, 2024
1 parent be56bd5 commit 961a063
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/blood/src/messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,16 +447,19 @@ void CGameMessageMgr::Display(void)

void CGameMessageMgr::Clear(void)
{
#if 0 // we have the CPU cycles with current-day hardware to delete every message now, don't use this old method
if (VanillaMode())
{
messagesIndex = nextMessagesIndex = numberOfDisplayedMessages = 0;
}
else
#endif
{
for (int i = 0; i < kMessageLogSize; i++)
{
messageStruct* pMessage = &messages[i];
pMessage->deleted = true;
pMessage->lastTickWhenVisible = 0;
}
}
}
Expand Down

0 comments on commit 961a063

Please sign in to comment.