forked from MagicBane/Server
Heightmap is now an integer.
This commit is contained in:
@@ -40,7 +40,7 @@ public class HeightMap {
|
||||
|
||||
public static final HashMap<Integer, HeightMap> heightmapByLoadNum = new HashMap<>();
|
||||
|
||||
public static final HashMap<String, int[][]> _pixelData = new HashMap<>();
|
||||
public static final HashMap<Integer, int[][]> _pixelData = new HashMap<>();
|
||||
|
||||
// Heightmap data for all zones.
|
||||
public static float SCALEVALUE = 1.0f / 255;
|
||||
@@ -341,7 +341,8 @@ public class HeightMap {
|
||||
|
||||
// Insert color data into lookup table
|
||||
|
||||
_pixelData.put(imageFile.getName().substring(0, imageFile.getName().lastIndexOf(".")), colorData);
|
||||
int heightMapID = Integer.parseInt(imageFile.getName().substring(0, imageFile.getName().lastIndexOf(".")));
|
||||
_pixelData.put(heightMapID, colorData);
|
||||
|
||||
} catch (IOException e) {
|
||||
Logger.error(e);
|
||||
|
||||
@@ -61,6 +61,15 @@ public class Zone extends AbstractGameObject {
|
||||
public static final Set<Mob> respawnQue = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
public static long lastRespawn = 0;
|
||||
public Bounds blendBounds;
|
||||
public float major_radius;
|
||||
public float minor_radius;
|
||||
public float min_blend;
|
||||
public float max_blend;
|
||||
public String sea_level_type;
|
||||
public float sea_level;
|
||||
public String terrain_type;
|
||||
public float terrain_max_y;
|
||||
public int terrain_image;
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
@@ -81,7 +90,15 @@ public class Zone extends AbstractGameObject {
|
||||
this.icon3 = rs.getString("icon3");
|
||||
this.min_level = rs.getInt("min_level");
|
||||
this.max_level = rs.getInt("max_level");
|
||||
this.hash = rs.getString("hash");
|
||||
this.major_radius = rs.getFloat("major_radius");
|
||||
this.minor_radius = rs.getFloat("minor_radius");
|
||||
this.min_blend = rs.getFloat("min_blend");
|
||||
this.max_blend = rs.getFloat("max_blend");
|
||||
this.sea_level_type = rs.getString("sea_level_type");
|
||||
this.sea_level = rs.getFloat("sea_level");
|
||||
this.terrain_type = rs.getString("terrain_type");
|
||||
this.terrain_max_y = rs.getFloat("terrain_max_y");
|
||||
this.terrain_image = rs.getInt("terrain_image");
|
||||
|
||||
//this needs to be here specifically for new zones created after server boot (e.g. player city zones)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user