Fix capture points displaying incorrectly when multple people are standing on them
This commit is contained in:
parent
59ca9c479f
commit
e92ffcc5b3
@ -104,8 +104,8 @@ public class TeamModule extends Module
|
||||
_teamRequests.remove(ally.getUniqueId());
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You accepted " + ally.getName() + "'s Team Request!"));
|
||||
UtilPlayer.message(ally, F.main("Game", player.getName() + " accepted your Team Request!"));
|
||||
UtilPlayer.message(player, F.main("Game", "You accepted " + F.name(ally.getName()) + "'s Team Request!"));
|
||||
UtilPlayer.message(ally, F.main("Game", F.name(player.getName()) + " accepted your Team Request!"));
|
||||
|
||||
//Leave Old Teams
|
||||
if (playerTeam != null)
|
||||
|
@ -199,7 +199,7 @@ public class CapturePoint
|
||||
{
|
||||
// Increase progress
|
||||
_progress += progress;
|
||||
display(team, true);
|
||||
display(team, progress, true);
|
||||
|
||||
// Captured
|
||||
if (_progress >= (_owner == null ? MAX_PROGRESS_NEUTRAL : MAX_PROGRESS))
|
||||
@ -223,7 +223,7 @@ public class CapturePoint
|
||||
}
|
||||
|
||||
_progress -= progress;
|
||||
display(team, false);
|
||||
display(team, progress, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -258,9 +258,9 @@ public class CapturePoint
|
||||
UtilServer.CallEvent(new CapturePointCaptureEvent(this));
|
||||
}
|
||||
|
||||
private void display(GameTeam team, boolean forward)
|
||||
private void display(GameTeam team, int progress, boolean forward)
|
||||
{
|
||||
double toChange = Math.ceil(_wool.size() / (_owner == null ? MAX_PROGRESS_NEUTRAL : MAX_PROGRESS)) + 1;
|
||||
double toChange = Math.ceil(_wool.size() / (_owner == null ? MAX_PROGRESS_NEUTRAL : MAX_PROGRESS)) * progress + 1;
|
||||
int changed = 0;
|
||||
for (Block block : _wool)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user