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:
parent
dd55d96ccf
commit
9cec81ee34
@ -82,8 +82,6 @@ public abstract class Challenge implements Listener
|
||||
|
||||
Settings = new ChallengeSettings(this);
|
||||
Data = new ChallengeData();
|
||||
|
||||
setBorder(-100, 100, 0, 256, -100, 100);
|
||||
}
|
||||
|
||||
public void markSpawnLocations()
|
||||
@ -155,6 +153,8 @@ public abstract class Challenge implements Listener
|
||||
|
||||
public void start()
|
||||
{
|
||||
setBorder(-100, 100, 0, 256, -100, 100);
|
||||
|
||||
Settings.setStartTime(System.currentTimeMillis());
|
||||
Settings.setMaxCompletedCount((int) Math.ceil(getPlayersAlive().size() / 2));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user