public String GetTeamName(int teamId)
{
if (teamId <= 0) return "Neutral";
String ret = "#" + teamId;
if (IsSQDM()) {
ret = GetSquadName(teamId);
} else if (IsRush() && teamId < RUSH_NAMES.Length) {
ret = RUSH_NAMES[teamId];
} else {
if (fGameVersion == GameVersion.BF4) {
if (teamId < fFactionByTeam.Length) {
int faction = fFactionByTeam[teamId];
if (faction < 0) {
return "T" + teamId;
} else if (faction >= BF4_TEAM_NAMES.Length) {
return "f" + faction + "." + teamId;
}
ret = BF4_TEAM_NAMES[faction];
}
} else if (fGameVersion == GameVersion.BFH) {
switch (teamId) {
case 1:
ret = "LE";
break;
case 2:
ret = "CR";
break;
default:
ret = "None";
break;
}
} else if (teamId < TEAM_NAMES.Length) {
ret = TEAM_NAMES[teamId];
}
}
return ret;
}