summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-27 00:39:39 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-27 00:39:39 +0200
commita5cca16abe524fdbd756908ac157a0c9881463f3 (patch)
treef677b281875fe89bc4ec349330d2ae13c18b7c75 /src/Entities/Player.cpp
parentFixed plugin count and fixed plugin loading, when settings.ini was regenerated. (diff)
downloadcuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.tar
cuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.tar.gz
cuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.tar.bz2
cuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.tar.lz
cuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.tar.xz
cuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.tar.zst
cuberite-a5cca16abe524fdbd756908ac157a0c9881463f3.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index fcc8eb9a0..393afc3b6 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -890,7 +890,7 @@ void cPlayer::KilledBy(TakeDamageInfo & a_TDI)
m_World->SpawnItemPickups(Pickups, GetPosX(), GetPosY(), GetPosZ(), 10);
SaveToDisk(); // Save it, yeah the world is a tough place !
- if (a_TDI.Attacker == NULL)
+ if ((a_TDI.Attacker == NULL) && m_World->ShouldBroadcastDeathMessages())
{
AString DamageText;
switch (a_TDI.DamageType)
@@ -1208,11 +1208,13 @@ unsigned int cPlayer::AwardAchievement(const eStatistic a_Ach)
}
else
{
- // First time, announce it
- cCompositeChat Msg;
- Msg.SetMessageType(mtSuccess);
- Msg.AddShowAchievementPart(GetName(), cStatInfo::GetName(a_Ach));
- m_World->BroadcastChat(Msg);
+ if (m_World->ShouldBroadcastAchievementMessages())
+ {
+ cCompositeChat Msg;
+ Msg.SetMessageType(mtSuccess);
+ Msg.AddShowAchievementPart(GetName(), cStatInfo::GetName(a_Ach));
+ m_World->BroadcastChat(Msg);
+ }
// Increment the statistic
StatValue New = m_Stats.AddValue(a_Ach);