if(team1Score < 0)
team1Score = 0;
if(affectAnotherTeam)
{
team2Score += toAdd;
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, true, player, getPlayerScore(player)));
}
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, false, player, getPlayerScore(player)));
}
else
{
team1Score += toAdd;
if(affectAnotherTeam)
{
team2Score -= toSub;
if(team2Score < 0)
team2Score = 0;
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, true, player, getPlayerScore(player)));
}
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, false, player, getPlayerScore(player)));
}
}
else if(teamId == 2)
if(subbing)
{
team2Score -= toSub;
if(team2Score < 0)
team2Score = 0;
if(affectAnotherTeam)
{
team1Score += toAdd;
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, false, player, getPlayerScore(player)));
}
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, true, player, getPlayerScore(player)));
}
else
{
team2Score += toAdd;
if(affectAnotherTeam)
{
team1Score -= toSub;
if(team1Score < 0)
team1Score = 0;
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, false, player, getPlayerScore(player)));
}
broadCastPacketToBothTeams(new ExCubeGameExtendedChangePoints(timeLeft, team1Score, team2Score, true, player, getPlayerScore(player)));
}
}