forked from MagicBane/Server
Player zone radius now reflects 24.3 at 875.
This commit is contained in:
@@ -2269,14 +2269,13 @@ public class Enum {
|
|||||||
|
|
||||||
public enum CityBoundsType {
|
public enum CityBoundsType {
|
||||||
|
|
||||||
GRID(512),
|
GRID(640),
|
||||||
ZONE(576),
|
ZONE(875);
|
||||||
SIEGE(1040);
|
|
||||||
|
|
||||||
public final float extents;
|
public final float extents;
|
||||||
|
|
||||||
CityBoundsType(float extents) {
|
CityBoundsType(float extents) {
|
||||||
this.extents = extents;
|
this.extents = extents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ public class MovementUtilities {
|
|||||||
|
|
||||||
//Guards recall distance = 814.
|
//Guards recall distance = 814.
|
||||||
if (tol != null){
|
if (tol != null){
|
||||||
if (agent.getLoc().distanceSquared2D(tol.getLoc()) > sqr(Enum.CityBoundsType.SIEGE.extents)) {
|
if (agent.getLoc().distanceSquared2D(tol.getLoc()) > sqr(Enum.CityBoundsType.ZONE.extents)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ public enum ZoneManager {
|
|||||||
|
|
||||||
city = City.getCity(zone.getPlayerCityUUID());
|
city = City.getCity(zone.getPlayerCityUUID());
|
||||||
|
|
||||||
if (worldLoc.isInsideCircle(city.getLoc(), Enum.CityBoundsType.SIEGE.extents))
|
if (worldLoc.isInsideCircle(city.getLoc(), Enum.CityBoundsType.ZONE.extents))
|
||||||
return city;
|
return city;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,11 +449,10 @@ public enum ZoneManager {
|
|||||||
|
|
||||||
|
|
||||||
treeBounds = Bounds.borrow();
|
treeBounds = Bounds.borrow();
|
||||||
treeBounds.setBounds(new Vector2f(positionX, positionZ), new Vector2f(Enum.CityBoundsType.SIEGE.extents, Enum.CityBoundsType.SIEGE.extents), 0.0f);
|
treeBounds.setBounds(new Vector2f(positionX, positionZ), new Vector2f(Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents), 0.0f);
|
||||||
|
|
||||||
zoneList = currentZone.getNodes();
|
zoneList = currentZone.getNodes();
|
||||||
|
|
||||||
|
|
||||||
for (Zone zone : zoneList) {
|
for (Zone zone : zoneList) {
|
||||||
|
|
||||||
if (zone.isContinent())
|
if (zone.isContinent())
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
|||||||
if (!building.getBlueprint().isSiegeEquip())
|
if (!building.getBlueprint().isSiegeEquip())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!building.getLoc().isInsideCircle(serverCity.getLoc(), Enum.CityBoundsType.SIEGE.extents))
|
if (!building.getLoc().isInsideCircle(serverCity.getLoc(), CityBoundsType.ZONE.extents))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (building.getGuild() == null)
|
if (building.getGuild() == null)
|
||||||
|
|||||||
@@ -276,14 +276,14 @@ public class Building extends AbstractWorldObject {
|
|||||||
if (this.getBlueprint() != null && this.getBlueprint().isSiegeEquip() && this.protectionState.equals(ProtectionState.PROTECTED)){
|
if (this.getBlueprint() != null && this.getBlueprint().isSiegeEquip() && this.protectionState.equals(ProtectionState.PROTECTED)){
|
||||||
if (this.getGuild() != null){
|
if (this.getGuild() != null){
|
||||||
if (this.getGuild().getOwnedCity() != null){
|
if (this.getGuild().getOwnedCity() != null){
|
||||||
if (this.getLoc().isInsideCircle(this.getGuild().getOwnedCity().getLoc(), Enum.CityBoundsType.SIEGE.extents))
|
if (this.getLoc().isInsideCircle(this.getGuild().getOwnedCity().getLoc(), CityBoundsType.ZONE.extents))
|
||||||
return this.getGuild().getOwnedCity();
|
return this.getGuild().getOwnedCity();
|
||||||
}else{
|
}else{
|
||||||
Bane bane = Bane.getBaneByAttackerGuild(this.getGuild());
|
Bane bane = Bane.getBaneByAttackerGuild(this.getGuild());
|
||||||
|
|
||||||
if (bane != null){
|
if (bane != null){
|
||||||
if (bane.getCity() != null){
|
if (bane.getCity() != null){
|
||||||
if (this.getLoc().isInsideCircle(bane.getCity().getLoc(), Enum.CityBoundsType.SIEGE.extents))
|
if (this.getLoc().isInsideCircle(bane.getCity().getLoc(), CityBoundsType.ZONE.extents))
|
||||||
return bane.getCity();
|
return bane.getCity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -942,7 +942,7 @@ public class City extends AbstractWorldObject {
|
|||||||
|
|
||||||
public boolean isLocationWithinSiegeBounds(Vector3fImmutable insideLoc) {
|
public boolean isLocationWithinSiegeBounds(Vector3fImmutable insideLoc) {
|
||||||
|
|
||||||
return insideLoc.isInsideCircle(this.getLoc(), CityBoundsType.SIEGE.extents);
|
return insideLoc.isInsideCircle(this.getLoc(), CityBoundsType.ZONE.extents);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1000,9 +1000,9 @@ public class City extends AbstractWorldObject {
|
|||||||
HashSet<Integer> currentMemory;
|
HashSet<Integer> currentMemory;
|
||||||
PlayerCharacter player;
|
PlayerCharacter player;
|
||||||
|
|
||||||
// Gather current list of players within a distance defined by the seige bounds
|
// Gather current list of players within the zone bounds
|
||||||
|
|
||||||
currentPlayers = WorldGrid.getObjectsInRangePartial(this.location, CityBoundsType.SIEGE.extents, MBServerStatics.MASK_PLAYER);
|
currentPlayers = WorldGrid.getObjectsInRangePartial(this.location, CityBoundsType.ZONE.extents, MBServerStatics.MASK_PLAYER);
|
||||||
currentMemory = new HashSet<>();
|
currentMemory = new HashSet<>();
|
||||||
|
|
||||||
for (AbstractWorldObject playerObject : currentPlayers) {
|
for (AbstractWorldObject playerObject : currentPlayers) {
|
||||||
|
|||||||
Reference in New Issue
Block a user