summaryrefslogtreecommitdiffstats
path: root/src/Scoreboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);