about summary refs log tree commit diff
path: root/src/game/server/gamemodes
diff options
context:
space:
mode:
authorTeetime <anton.tsoulos@yahoo.de>2011-10-14 02:55:31 +0200
committerTeetime <anton.tsoulos@yahoo.de>2011-10-14 02:55:31 +0200
commit1b0cfb54e54dde56a0e60437ca631f30810f3a49 (patch)
treec746735b80bbaef664f4f0306ab75ab42a4a1037 /src/game/server/gamemodes
parent5bd8c48b3c3f4e6c0d6fdc3c1b9a7e604ea1f3bb (diff)
downloadzcatch-1b0cfb54e54dde56a0e60437ca631f30810f3a49.tar.gz
zcatch-1b0cfb54e54dde56a0e60437ca631f30810f3a49.zip
corrected a bug on colorindicator
Diffstat (limited to 'src/game/server/gamemodes')
-rw-r--r--src/game/server/gamemodes/zcatch.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game/server/gamemodes/zcatch.cpp b/src/game/server/gamemodes/zcatch.cpp
index fb9af45e..1813e07f 100644
--- a/src/game/server/gamemodes/zcatch.cpp
+++ b/src/game/server/gamemodes/zcatch.cpp
@@ -69,6 +69,7 @@ int CGameController_zCatch::OnCharacterDeath(class CCharacter *pVictim, class CP
 		pVictim->GetPlayer()->m_Deaths++; 
 		
 		pKiller->m_Score++;
+		
 		/* Check if the killer is already killed and in spectator (victim may died through wallshot) */
 		if(pKiller->GetTeam() != TEAM_SPECTATORS)
 		{
@@ -92,12 +93,15 @@ int CGameController_zCatch::OnCharacterDeath(class CCharacter *pVictim, class CP
 				GameServer()->m_apPlayers[i]->m_CatchedBy = ZCATCH_NOT_CATCHED;
 				GameServer()->m_apPlayers[i]->SetTeamDirect(GameServer()->m_pController->ClampTeam(1));
 				
-				OnPlayerInfoChange(GameServer()->m_apPlayers[i]);
 				if(pKiller != pVictim->GetPlayer())
 					pKiller->m_Score++;
 			}
 		}
 	}
+		
+	// Update color of the killer
+	OnPlayerInfoChange(pKiller);
+	
 	return 0;
 }
 
@@ -136,7 +140,6 @@ void CGameController_zCatch::StartRound()
 			GameServer()->m_apPlayers[i]->m_Deaths = 0;
 			GameServer()->m_apPlayers[i]->m_TicksSpec = 0;
 			GameServer()->m_apPlayers[i]->m_TicksIngame = 0;
-			OnPlayerInfoChange(GameServer()->m_apPlayers[i]);
 		}
 	}
 	char aBufMsg[256];
@@ -174,6 +177,7 @@ void CGameController_zCatch::OnCharacterSpawn(class CCharacter *pChr)
 				pChr->GiveWeapon(WEAPON_GRENADE, -1);
 				break;
 		}
+	//Update color of spawning tees
 	OnPlayerInfoChange(pChr->GetPlayer());
 }
 
@@ -187,7 +191,6 @@ void CGameController_zCatch::EndRound()
 			if(GameServer()->m_apPlayers[i]->m_SpecExplicit == 0)
 			{
 				GameServer()->m_apPlayers[i]->SetTeamDirect(GameServer()->m_pController->ClampTeam(1));
-				OnPlayerInfoChange(GameServer()->m_apPlayers[i]);
 				
 				char abuf[128];
 				str_format(abuf, sizeof(abuf), "Kills: %d | Deaths: %d", GameServer()->m_apPlayers[i]->m_Kills, GameServer()->m_apPlayers[i]->m_Deaths);