forked from MagicBane/Server
Dev command updated
This commit is contained in:
@@ -55,8 +55,6 @@ public class Terrain {
|
|||||||
public short[][] pixelColorValues;
|
public short[][] pixelColorValues;
|
||||||
public int cell_count_x;
|
public int cell_count_x;
|
||||||
public int cell_count_y;
|
public int cell_count_y;
|
||||||
public float zone_minBlend;
|
|
||||||
public float zone_maxBlend;
|
|
||||||
|
|
||||||
public float terrain_scale;
|
public float terrain_scale;
|
||||||
|
|
||||||
@@ -69,9 +67,6 @@ public class Terrain {
|
|||||||
this.zoneLoadID = rs.getInt("zoneLoadID");
|
this.zoneLoadID = rs.getInt("zoneLoadID");
|
||||||
this.seaLevel = rs.getFloat("seaLevel");
|
this.seaLevel = rs.getFloat("seaLevel");
|
||||||
|
|
||||||
this.zone_minBlend = rs.getFloat("outsetZ");
|
|
||||||
this.zone_maxBlend = rs.getFloat("outsetX");
|
|
||||||
|
|
||||||
// Cache the full extents to avoid the calculation
|
// Cache the full extents to avoid the calculation
|
||||||
|
|
||||||
this.fullExtentsX = halfExtentsX * 2;
|
this.fullExtentsX = halfExtentsX * 2;
|
||||||
@@ -121,8 +116,6 @@ public class Terrain {
|
|||||||
int halfExtentsY = (int) Enum.CityBoundsType.ZONE.halfExtents;
|
int halfExtentsY = (int) Enum.CityBoundsType.ZONE.halfExtents;
|
||||||
this.zoneLoadID = 0;
|
this.zoneLoadID = 0;
|
||||||
this.seaLevel = 0;
|
this.seaLevel = 0;
|
||||||
this.zone_minBlend = 0;
|
|
||||||
this.zone_maxBlend = 0;
|
|
||||||
|
|
||||||
// Cache the full extents to avoid the calculation
|
// Cache the full extents to avoid the calculation
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ package engine.devcmd.cmds;
|
|||||||
import engine.InterestManagement.Terrain;
|
import engine.InterestManagement.Terrain;
|
||||||
import engine.devcmd.AbstractDevCmd;
|
import engine.devcmd.AbstractDevCmd;
|
||||||
import engine.gameManager.ZoneManager;
|
import engine.gameManager.ZoneManager;
|
||||||
import engine.math.Bounds;
|
|
||||||
import engine.math.Vector2f;
|
import engine.math.Vector2f;
|
||||||
import engine.objects.AbstractGameObject;
|
import engine.objects.AbstractGameObject;
|
||||||
import engine.objects.PlayerCharacter;
|
import engine.objects.PlayerCharacter;
|
||||||
@@ -44,28 +43,15 @@ public class GetHeightCmd extends AbstractDevCmd {
|
|||||||
|
|
||||||
this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.zoneName);
|
this.throwbackInfo(playerCharacter, "Current Zone : " + currentZone.zoneName);
|
||||||
this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.zoneName);
|
this.throwbackInfo(playerCharacter, "Heightmap Zone : " + heightmapZone.zoneName);
|
||||||
this.throwbackInfo(playerCharacter, "Zone Height: " + heightmapZone.worldAltitude);
|
this.throwbackInfo(playerCharacter, "Global Height: " + heightmapZone.worldAltitude);
|
||||||
this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.seaLevel);
|
this.throwbackInfo(playerCharacter, "Sea Level: " + heightmapZone.seaLevel);
|
||||||
this.throwbackInfo(playerCharacter, "Drowning Height: " + (heightmapZone.seaLevel + playerCharacter.getCharacterHeight()));
|
this.throwbackInfo(playerCharacter, "Grid : " + Math.floor(gridSquare.x) + "x" + Math.floor(gridSquare.y));
|
||||||
this.throwbackInfo(playerCharacter, "Grid : " + (int) gridSquare.x + "x" + (int) gridSquare.y);
|
this.throwbackInfo(playerCharacter, "Height returned: " + currentHeight);
|
||||||
this.throwbackInfo(playerCharacter, "*** 256: " + currentHeight);
|
|
||||||
this.throwbackInfo(playerCharacter, "***Adjusted Height: " + (currentHeight + playerCharacter.getCharacterHeight()));
|
|
||||||
|
|
||||||
this.throwbackInfo(playerCharacter, "------------");
|
this.throwbackInfo(playerCharacter, "------------");
|
||||||
this.throwbackInfo(playerCharacter, "Parent : " + parentZone.zoneName);
|
this.throwbackInfo(playerCharacter, "Parent : " + parentZone.zoneName);
|
||||||
this.throwbackInfo(playerCharacter, "Height returned : " + parentHeight);
|
this.throwbackInfo(playerCharacter, "Height returned : " + parentHeight);
|
||||||
this.throwbackInfo(playerCharacter, "------------");
|
this.throwbackInfo(playerCharacter, "------------");
|
||||||
|
|
||||||
this.throwbackInfo(playerCharacter, "Min: " + heightmapZone.getHeightMap().zone_minBlend + " Max: " + heightmapZone.getHeightMap().zone_maxBlend);
|
|
||||||
|
|
||||||
|
|
||||||
if (Bounds.collide(playerCharacter.getLoc(), heightmapZone.blendBounds)) {
|
|
||||||
this.throwbackInfo(playerCharacter, "Blend: Max (Child)");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.throwbackInfo(playerCharacter, "Blend: Min (LERP)");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ public class Zone extends AbstractGameObject {
|
|||||||
public float seaLevel = 0f;
|
public float seaLevel = 0f;
|
||||||
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||||
public static long lastRespawn = 0;
|
public static long lastRespawn = 0;
|
||||||
public Bounds blendBounds;
|
|
||||||
public float major_radius;
|
public float major_radius;
|
||||||
public float minor_radius;
|
public float minor_radius;
|
||||||
public float min_blend;
|
public float min_blend;
|
||||||
@@ -193,17 +192,6 @@ public class Zone extends AbstractGameObject {
|
|||||||
else
|
else
|
||||||
bounds.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.halfExtents, Enum.CityBoundsType.ZONE.halfExtents), 0.0f);
|
bounds.setBounds(new Vector2f(this.absX, this.absZ), new Vector2f(Enum.CityBoundsType.ZONE.halfExtents, Enum.CityBoundsType.ZONE.halfExtents), 0.0f);
|
||||||
|
|
||||||
Terrain terrain = this.getHeightMap();
|
|
||||||
|
|
||||||
// Set heightmap blending bounds
|
|
||||||
|
|
||||||
if (terrain == null) {
|
|
||||||
this.blendBounds = bounds;
|
|
||||||
} else {
|
|
||||||
this.blendBounds = Bounds.borrow();
|
|
||||||
this.blendBounds.setBounds(new Vector2f(this.absX, this.absZ), bounds.getHalfExtents().subtract(terrain.zone_minBlend, terrain.zone_minBlend), 0.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setParent(final Zone value) {
|
public void setParent(final Zone value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user