| 306 | |
| 307 | |
| 308 | bool cScoreboard::RemoveObjective(const AString & a_Name) |
| 309 | { |
| 310 | cCSLock Lock(m_CSObjectives); |
| 311 | |
| 312 | cObjectiveMap::iterator it = m_Objectives.find(a_Name); |
| 313 | |
| 314 | if (it == m_Objectives.end()) |
| 315 | { |
| 316 | return false; |
| 317 | } |
| 318 | |
| 319 | ASSERT(m_World != NULL); |
| 320 | m_World->BroadcastScoreboardObjective(it->second.GetName(), it->second.GetDisplayName(), 1); |
| 321 | |
| 322 | for (unsigned int i = 0; i < (unsigned int) dsCount; ++i) |
| 323 | { |
| 324 | if (m_Display[i] == &it->second) |
| 325 | { |
| 326 | SetDisplay(NULL, (eDisplaySlot) i); |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | m_Objectives.erase(it); |
| 331 | |
| 332 | return true; |
| 333 | } |
| 334 | |
| 335 | |
| 336 |
nothing calls this directly
no test coverage detected