Browse Source

Player zone radius now reflects 24.3 at 875.

master
MagicBot 2 years ago
parent
commit
a113295058
  1. 5
      src/engine/Enum.java
  2. 2
      src/engine/ai/utilities/MovementUtilities.java
  3. 5
      src/engine/gameManager/ZoneManager.java
  4. 2
      src/engine/net/client/handlers/PlaceAssetMsgHandler.java
  5. 4
      src/engine/objects/Building.java
  6. 6
      src/engine/objects/City.java

5
src/engine/Enum.java

@ -2269,9 +2269,8 @@ public class Enum { @@ -2269,9 +2269,8 @@ public class Enum {
public enum CityBoundsType {
GRID(512),
ZONE(576),
SIEGE(1040);
GRID(640),
ZONE(875);
public final float extents;

2
src/engine/ai/utilities/MovementUtilities.java

@ -53,7 +53,7 @@ public class MovementUtilities { @@ -53,7 +53,7 @@ public class MovementUtilities {
//Guards recall distance = 814.
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;
}
}

5
src/engine/gameManager/ZoneManager.java

@ -424,7 +424,7 @@ public enum ZoneManager { @@ -424,7 +424,7 @@ public enum ZoneManager {
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;
}
@ -449,11 +449,10 @@ public enum ZoneManager { @@ -449,11 +449,10 @@ public enum ZoneManager {
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();
for (Zone zone : zoneList) {
if (zone.isContinent())

2
src/engine/net/client/handlers/PlaceAssetMsgHandler.java

@ -427,7 +427,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler { @@ -427,7 +427,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
if (!building.getBlueprint().isSiegeEquip())
continue;
if (!building.getLoc().isInsideCircle(serverCity.getLoc(), Enum.CityBoundsType.SIEGE.extents))
if (!building.getLoc().isInsideCircle(serverCity.getLoc(), CityBoundsType.ZONE.extents))
continue;
if (building.getGuild() == null)

4
src/engine/objects/Building.java

@ -276,14 +276,14 @@ public class Building extends AbstractWorldObject { @@ -276,14 +276,14 @@ public class Building extends AbstractWorldObject {
if (this.getBlueprint() != null && this.getBlueprint().isSiegeEquip() && this.protectionState.equals(ProtectionState.PROTECTED)){
if (this.getGuild() != 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();
}else{
Bane bane = Bane.getBaneByAttackerGuild(this.getGuild());
if (bane != 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();
}
}

6
src/engine/objects/City.java

@ -942,7 +942,7 @@ public class City extends AbstractWorldObject { @@ -942,7 +942,7 @@ public class City extends AbstractWorldObject {
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 { @@ -1000,9 +1000,9 @@ public class City extends AbstractWorldObject {
HashSet<Integer> currentMemory;
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<>();
for (AbstractWorldObject playerObject : currentPlayers) {

Loading…
Cancel
Save