diff options
author | andrew <xdotftw@gmail.com> | 2014-03-02 20:25:05 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-03-02 20:25:05 +0100 |
commit | 070d483236279e69c736e740fa8459d3ac627790 (patch) | |
tree | d4431ca58c236556056e041b3d888ea61e7ac144 /src/Scoreboard.cpp | |
parent | Fixed MSVC warnings in DeprecatedBindings. (diff) | |
download | cuberite-070d483236279e69c736e740fa8459d3ac627790.tar cuberite-070d483236279e69c736e740fa8459d3ac627790.tar.gz cuberite-070d483236279e69c736e740fa8459d3ac627790.tar.bz2 cuberite-070d483236279e69c736e740fa8459d3ac627790.tar.lz cuberite-070d483236279e69c736e740fa8459d3ac627790.tar.xz cuberite-070d483236279e69c736e740fa8459d3ac627790.tar.zst cuberite-070d483236279e69c736e740fa8459d3ac627790.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Scoreboard.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp index 05fd0314d..c1da27086 100644 --- a/src/Scoreboard.cpp +++ b/src/Scoreboard.cpp @@ -312,12 +312,18 @@ bool cScoreboard::RemoveObjective(const AString & a_Name) return false; } - m_Objectives.erase(it); - ASSERT(m_World != NULL); m_World->BroadcastScoreboardObjective(it->second.GetName(), it->second.GetDisplayName(), 1); - // TODO 2014-03-01 xdot: Remove objective from display slot + for (unsigned int i = 0; i < (unsigned int) dsCount; ++i) + { + if (m_Display[i] == &it->second) + { + SetDisplay(NULL, (eDisplaySlot) i); + } + } + + m_Objectives.erase(it); return true; } |