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

@@ -809,7 +809,7 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
SaveToDisk(); // Save it, yeah the world is a tough place !
cPluginManager * PluginManager = cRoot::Get()->GetPluginManager();
if ((a_TDI.Attacker == nullptr) && m_World->ShouldBroadcastDeathMessages())
if (a_TDI.Attacker == nullptr)
{
const AString DamageText = [&]
{
@@ -845,10 +845,6 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
GetWorld()->BroadcastChatDeath(DeathMessage);
}
}
else if (a_TDI.Attacker == nullptr) // && !m_World->ShouldBroadcastDeathMessages() by fallthrough
{
// no-op
}
else if (a_TDI.Attacker->IsPlayer())
{
cPlayer * Killer = static_cast<cPlayer *>(a_TDI.Attacker);