Define border after challenge is started.

Previously, the border was defined in the challenge constructor,
as a result the boundaries were not set correctly. That's because
the map center on each challenge is defined in the constructor, and
since the super one is called before the challenge constructor, the map
center which defines part of the border was not correct.
This commit is contained in:
Thanos Paravantis 2016-07-05 12:35:27 +03:00
parent dd55d96ccf
commit 9cec81ee34
1 changed files with 2 additions and 2 deletions

View File

@ -82,8 +82,6 @@ public abstract class Challenge implements Listener
Settings = new ChallengeSettings(this); Settings = new ChallengeSettings(this);
Data = new ChallengeData(); Data = new ChallengeData();
setBorder(-100, 100, 0, 256, -100, 100);
} }
public void markSpawnLocations() public void markSpawnLocations()
@ -155,6 +153,8 @@ public abstract class Challenge implements Listener
public void start() public void start()
{ {
setBorder(-100, 100, 0, 256, -100, 100);
Settings.setStartTime(System.currentTimeMillis()); Settings.setStartTime(System.currentTimeMillis());
Settings.setMaxCompletedCount((int) Math.ceil(getPlayersAlive().size() / 2)); Settings.setMaxCompletedCount((int) Math.ceil(getPlayersAlive().size() / 2));