Browse Source

statAlt used as offset to terrain.

magicbox-1.5.2.1
MagicBot 3 days ago
parent
commit
84347f8290
  1. 3
      src/engine/db/handlers/dbHandlerBase.java
  2. 2
      src/engine/objects/Building.java

3
src/engine/db/handlers/dbHandlerBase.java

@ -58,6 +58,9 @@ public abstract class dbHandlerBase {
int id = rs.getInt(1); int id = rs.getInt(1);
if (id == 39052)
Logger.info(id);
if (DbManager.inCache(localObjectType, id)) { if (DbManager.inCache(localObjectType, id)) {
objectList.add((T) DbManager.getFromCache(localObjectType, id)); objectList.add((T) DbManager.getFromCache(localObjectType, id));
} else { } else {

2
src/engine/objects/Building.java

@ -959,7 +959,7 @@ public class Building extends AbstractWorldObject {
// Altitude of this building is derived from the heightmap engine. // Altitude of this building is derived from the heightmap engine.
Vector3fImmutable tempLoc = new Vector3fImmutable(this.statLat + this.parentZone.absX, 0, this.statLon + this.parentZone.absZ); Vector3fImmutable tempLoc = new Vector3fImmutable(this.statLat + this.parentZone.absX, 0, this.statLon + this.parentZone.absZ);
tempLoc = new Vector3fImmutable(tempLoc.x, Terrain.getWorldHeight(tempLoc), tempLoc.z); tempLoc = new Vector3fImmutable(tempLoc.x, Terrain.getWorldHeight(tempLoc) + this.statAlt, tempLoc.z);
this.setLoc(tempLoc); this.setLoc(tempLoc);
} }
} }

Loading…
Cancel
Save