Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public abstract class Match implements IMatch {
private Kit kit;
private List<Participant> participants;
private int rounds;
private int currentRound;
private boolean duel;
private boolean ended;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class FfaFightMatch extends Match implements IFffaFightMatch {
private Participant winner;

public FfaFightMatch(VirtualArena arena, Kit kit, List<Participant> participants) {
super(MatchState.STARTING, arena, kit, participants, 1, true, false);
super(MatchState.STARTING, arena, kit, participants, 1, 1, true, false);
this.winner = null;
this.deadParticipants = new ArrayList<>();
this.participants = participants;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class SoloFightMatch extends Match implements ISoloFightMatch {

public SoloFightMatch(VirtualArena arena, Kit kit, boolean duel, List<Participant> participants, Participant participantA,
Participant participantB, int rounds) {
super(MatchState.STARTING, arena, kit, participants, rounds, duel, false);
super(MatchState.STARTING, arena, kit, participants, rounds, 1, duel, false);
this.participantA = participantA;
this.participantB = participantB;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class TeamFightMatch extends Match implements ITeamFightMatch {

public TeamFightMatch(VirtualArena arena, Kit kit, List<Participant> participants,
MatchTeam teamA, MatchTeam teamB) {
super(MatchState.STARTING, arena, kit, participants, 1, true, false);
super(MatchState.STARTING, arena, kit, participants, 1, 1, true, false);
this.teamA = teamA;
this.teamB = teamB;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public MatchSecondRoundRunnable(Match match, Participant participant) {
public void run() {
if (!MatchService.get().matches.contains(match) || participant.isLeft()) {
stop();

return;
}

Expand Down Expand Up @@ -60,6 +59,7 @@ public void run() {
}

if (respawnTimer == 3) {
match.setCurrentRound(match.getCurrentRound() + 1);
match.setupParticipants();
match.teleportToPositions();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public String format(String line, Player player) {

line = line.replaceAll("<maxPoints>", String.valueOf(match.getRounds())); // to be removed
line = line.replaceAll("<rounds>", String.valueOf(match.getRounds()));
line = line.replaceAll("<round>", String.valueOf(match.getCurrentRound()));
Division kitDivision = profile.getGameData().get(match.getKit()).getDivision();
line = line.replaceAll("<kit_division>",
kitDivision == null ? "None" : kitDivision.getDisplayName());
Expand Down