Browse Source

Placement bounds of 1.2% city zone size.

master
MagicBot 2 years ago
parent
commit
e73f4cbe63
  1. 3
      src/engine/Enum.java
  2. 2
      src/engine/gameManager/ZoneManager.java
  3. 22
      src/engine/net/client/handlers/PlaceAssetMsgHandler.java

3
src/engine/Enum.java

@ -2270,7 +2270,8 @@ public class Enum {
public enum CityBoundsType { public enum CityBoundsType {
GRID(640), GRID(640),
ZONE(875); ZONE(875),
PLACEMENT(1050);
public final float extents; public final float extents;

2
src/engine/gameManager/ZoneManager.java

@ -407,7 +407,7 @@ public enum ZoneManager {
treeBounds = Bounds.borrow(); treeBounds = Bounds.borrow();
treeBounds.setBounds(new Vector2f(positionX, positionZ), new Vector2f(Enum.CityBoundsType.ZONE.extents, Enum.CityBoundsType.ZONE.extents), 0.0f); treeBounds.setBounds(new Vector2f(positionX, positionZ), new Vector2f(Enum.CityBoundsType.PLACEMENT.extents, Enum.CityBoundsType.PLACEMENT.extents), 0.0f);
zoneList = currentZone.getNodes(); zoneList = currentZone.getNodes();

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

@ -924,28 +924,6 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
} }
// Method deletes one item from the player's inventory
// based on the mesh UUID the deed/seed spawns
private static void removeDeedByMeshUUID(PlayerCharacter player, int meshUUID) {
CharacterItemManager inventoryManager;
ArrayList<Item> itemList;
inventoryManager = player.getCharItemManager();
itemList = player.getInventory();
for (Item inventoryItem : itemList) {
if (inventoryItem.getItemBase().getUseID() == meshUUID) {
inventoryManager.delete(inventoryItem);
inventoryManager.updateInventory();
return;
}
}
}
// Method validates the location we have selected for our new city // Method validates the location we have selected for our new city
private static boolean validateTreeOfLifePlacement(PlayerCharacter playerCharacter, Realm serverRealm, Zone serverZone, private static boolean validateTreeOfLifePlacement(PlayerCharacter playerCharacter, Realm serverRealm, Zone serverZone,

Loading…
Cancel
Save