summaryrefslogtreecommitdiffstats
path: root/src/Scoreboard.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-01 11:06:19 +0100
committerandrew <xdotftw@gmail.com>2014-03-01 11:08:40 +0100
commit5c449452871340eeae9df8f34c5e145fda991d92 (patch)
treee55eed91cb7616386dd1fe2c04b4904a0ff5099b /src/Scoreboard.cpp
parentForgotten changes to cChunkInterface. (diff)
downloadcuberite-5c449452871340eeae9df8f34c5e145fda991d92.tar
cuberite-5c449452871340eeae9df8f34c5e145fda991d92.tar.gz
cuberite-5c449452871340eeae9df8f34c5e145fda991d92.tar.bz2
cuberite-5c449452871340eeae9df8f34c5e145fda991d92.tar.lz
cuberite-5c449452871340eeae9df8f34c5e145fda991d92.tar.xz
cuberite-5c449452871340eeae9df8f34c5e145fda991d92.tar.zst
cuberite-5c449452871340eeae9df8f34c5e145fda991d92.zip
Diffstat (limited to 'src/Scoreboard.cpp')
-rw-r--r--src/Scoreboard.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp
index 61ecac5b7..1c5a22eff 100644
--- a/src/Scoreboard.cpp
+++ b/src/Scoreboard.cpp
@@ -246,6 +246,17 @@ void cTeam::Reset(void)
+void cTeam::SetDisplayName(const AString & a_Name)
+{
+ m_DisplayName = a_Name;
+
+ // TODO 2014-03-01 xdot: Update clients
+}
+
+
+
+
+
unsigned int cTeam::GetNumPlayers(void) const
{
return m_Players.size();
@@ -306,6 +317,8 @@ bool cScoreboard::RemoveObjective(const AString & a_Name)
ASSERT(m_World != NULL);
m_World->BroadcastScoreboardObjective(it->second.GetName(), it->second.GetDisplayName(), 1);
+ // TODO 2014-03-01 xdot: Remove objective from display slot
+
return true;
}
@@ -465,6 +478,23 @@ void cScoreboard::ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallb
+void cScoreboard::AddPlayerScore(const AString & a_Name, cObjective::eType a_Type, cObjective::Score a_Value)
+{
+ cCSLock Lock(m_CSObjectives);
+
+ for (cObjectiveMap::iterator it = m_Objectives.begin(); it != m_Objectives.end(); ++it)
+ {
+ if (it->second.GetType() == a_Type)
+ {
+ it->second.AddScore(a_Name, a_Value);
+ }
+ }
+}
+
+
+
+
+
void cScoreboard::SendTo(cClientHandle & a_Client)
{
cCSLock Lock(m_CSObjectives);