| 756 | } |
| 757 | |
| 758 | void IGameController::DoTeamChange(CPlayer *pPlayer, int Team, bool DoChatMsg) |
| 759 | { |
| 760 | if(!IsValidTeam(Team)) |
| 761 | return; |
| 762 | |
| 763 | if(Team == pPlayer->GetTeam()) |
| 764 | return; |
| 765 | |
| 766 | pPlayer->SetTeam(Team); |
| 767 | int ClientId = pPlayer->GetCid(); |
| 768 | |
| 769 | char aBuf[128]; |
| 770 | DoChatMsg = false; |
| 771 | if(DoChatMsg) |
| 772 | { |
| 773 | str_format(aBuf, sizeof(aBuf), "'%s' joined the %s", Server()->ClientName(ClientId), GameServer()->m_pController->GetTeamName(Team)); |
| 774 | GameServer()->SendChat(-1, TEAM_ALL, aBuf); |
| 775 | } |
| 776 | |
| 777 | str_format(aBuf, sizeof(aBuf), "team_join player='%d:%s' m_Team=%d", ClientId, Server()->ClientName(ClientId), Team); |
| 778 | GameServer()->Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", aBuf); |
| 779 | |
| 780 | // OnPlayerInfoChange(pPlayer); |
| 781 | } |
| 782 | |
| 783 | int IGameController::TileFlagsToPickupFlags(int TileFlags) const |
| 784 | { |
no test coverage detected