1
0

Fixed some death messages showing up even when they are disabled. (#5153)

This commit is contained in:
NiLSPACE
2021-03-11 22:26:35 +01:00
committed by GitHub
parent 01a4e696b3
commit c729d7abde
2 changed files with 6 additions and 5 deletions

View File

@@ -186,6 +186,11 @@ void cWorld::BroadcastBossBarUpdateHealth(const cEntity & a_Entity, UInt32 a_Uni
void cWorld::BroadcastChat(const AString & a_Message, const cClientHandle * a_Exclude, eMessageType a_ChatPrefix)
{
if ((a_ChatPrefix == mtDeath) && !ShouldBroadcastDeathMessages())
{
return;
}
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
{
a_Client.SendChat(a_Message, a_ChatPrefix);