summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-30 10:06:18 +0200
committermadmaxoft <github@xoft.cz>2014-07-30 10:06:18 +0200
commitf095e770b84178ad45cbf3ba484b6ee18a239cb7 (patch)
tree70cbfedf25e0abc83655471a8ce44fee99b878f6 /src/Entities
parentFixed "Dependency" typos (diff)
parentChange Group->SetColor() again. (diff)
downloadcuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.tar
cuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.tar.gz
cuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.tar.bz2
cuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.tar.lz
cuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.tar.xz
cuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.tar.zst
cuberite-f095e770b84178ad45cbf3ba484b6ee18a239cb7.zip
Diffstat (limited to 'src/Entities')
-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 cf3322968..603fc7937 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -882,7 +882,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)
@@ -1200,11 +1200,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);