forked from MagicBane/Server
adjust arena size
This commit is contained in:
@@ -18,6 +18,8 @@ public class ArenaManager {
|
|||||||
public static Long pulseDelay = 180000L;
|
public static Long pulseDelay = 180000L;
|
||||||
public static Long lastExecution = 0L;
|
public static Long lastExecution = 0L;
|
||||||
|
|
||||||
|
public static float arena_radius = 500f;
|
||||||
|
|
||||||
public static void pulseArenas() {
|
public static void pulseArenas() {
|
||||||
if(lastExecution == 0L){
|
if(lastExecution == 0L){
|
||||||
lastExecution = System.currentTimeMillis();
|
lastExecution = System.currentTimeMillis();
|
||||||
@@ -132,7 +134,7 @@ public class ArenaManager {
|
|||||||
float y = 0; // Y coordinate is always 0
|
float y = 0; // Y coordinate is always 0
|
||||||
|
|
||||||
loc = new Vector3fImmutable(x, y, z * -1);
|
loc = new Vector3fImmutable(x, y, z * -1);
|
||||||
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(loc,500f, MBServerStatics.MASK_PLAYER);
|
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(loc,arena_radius, MBServerStatics.MASK_PLAYER);
|
||||||
if(inRange.isEmpty() && !isUnderWater(loc))
|
if(inRange.isEmpty() && !isUnderWater(loc))
|
||||||
locSet = true;
|
locSet = true;
|
||||||
//}
|
//}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ public class Arena {
|
|||||||
|
|
||||||
}
|
}
|
||||||
public Boolean disqualify() {
|
public Boolean disqualify() {
|
||||||
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(this.loc, 250f, MBServerStatics.MASK_PLAYER);
|
HashSet<AbstractWorldObject> inRange = WorldGrid.getObjectsInRangePartial(this.loc, ArenaManager.arena_radius, MBServerStatics.MASK_PLAYER);
|
||||||
HashSet<AbstractWorldObject> warningRange = WorldGrid.getObjectsInRangePartial(this.loc, 500f, MBServerStatics.MASK_PLAYER);
|
HashSet<AbstractWorldObject> warningRange = WorldGrid.getObjectsInRangePartial(this.loc, ArenaManager.arena_radius + 250f, MBServerStatics.MASK_PLAYER);
|
||||||
for(AbstractWorldObject obj : warningRange){
|
for(AbstractWorldObject obj : warningRange){
|
||||||
PlayerCharacter pc = (PlayerCharacter)obj;
|
PlayerCharacter pc = (PlayerCharacter)obj;
|
||||||
if(pc.equals(this.player1) || pc.equals(this.player2))
|
if(pc.equals(this.player1) || pc.equals(this.player2))
|
||||||
|
|||||||
Reference in New Issue
Block a user