1
0

Scoreboard improvements

This commit is contained in:
andrew
2014-01-19 16:02:37 +02:00
parent 2b94361059
commit f321b5d224
3 changed files with 83 additions and 120 deletions

View File

@@ -798,7 +798,7 @@ void cPlayer::DoTakeDamage(TakeDamageInfo & a_TDI)
if ((m_Team != NULL) && (m_Team == Attacker->m_Team))
{
if (!m_Team->GetFriendlyFire())
if (!m_Team->AllowsFriendlyFire())
{
// Friendly fire is disabled
return;
@@ -868,7 +868,7 @@ void cPlayer::KilledBy(cEntity * a_Killer)
cScoreboard* Scoreboard = m_World->GetScoreBoard();
// Update scoreboard objectives
Scoreboard->ForEachObjectiveWith(E_OBJECTIVE_DEATH_COUNT, IncrementCounter);
Scoreboard->ForEachObjectiveWith(cObjective::E_TYPE_DEATH_COUNT, IncrementCounter);
}
@@ -953,14 +953,14 @@ void cPlayer::SetTeam(cTeam* a_Team)
{
if (m_Team)
{
m_Team->RemovePlayer(this);
m_Team->RemovePlayer(GetName());
}
m_Team = a_Team;
if (m_Team)
{
m_Team->AddPlayer(this);
m_Team->AddPlayer(GetName());
}
}