diff options
| author | xalduin <xalduin@gmail.com> | 2010-06-03 10:35:18 -0400 |
|---|---|---|
| committer | xalduin <xalduin@gmail.com> | 2010-06-03 10:35:18 -0400 |
| commit | 3fff61d24aebd77dc6feb289595620e114730c86 (patch) | |
| tree | 963c4281803ca09e21f07b3fbe256c7f3869d1e8 /src/game/server | |
| parent | 6baadea5e1319ee35511bddbe1bcca36834e3fb4 (diff) | |
| download | zcatch-3fff61d24aebd77dc6feb289595620e114730c86.tar.gz zcatch-3fff61d24aebd77dc6feb289595620e114730c86.zip | |
Issue #86, don't reset score on team switch
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/player.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 8e58b7c1..354b8118 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -156,9 +156,11 @@ void CPlayer::SetTeam(int Team) GameServer()->SendChat(-1, CGameContext::CHAT_ALL, Buf); KillCharacter(); + if( m_Team != -1 ) // Give a point to make up for killing character, but not if they're a spectator + m_Score += 1; + m_Team = Team; - m_Score = 0; - m_ScoreStartTick = Server()->Tick(); + //m_ScoreStartTick = Server()->Tick(); // we got to wait 0.5 secs before respawning m_RespawnTick = Server()->Tick()+Server()->TickSpeed()/2; dbg_msg("game", "team_join player='%d:%s' m_Team=%d", m_ClientID, Server()->ClientName(m_ClientID), m_Team); |