Runegates and portals now loaded from database.

This commit is contained in:
2023-02-15 12:12:30 -05:00
parent 9fa83fc359
commit 2c0a46e652
12 changed files with 163 additions and 341 deletions
+4 -10
View File
@@ -2183,23 +2183,17 @@ boolean updateCity = false;
Building rg = null;
Vector3fImmutable rgLoc;
for (Runegate runegate : Runegate.getRunegates()) {
for (Runegate runegate : Runegate._runegates.values()) {
if ((runegate.getGateType() == RunegateType.OBLIV) ||
(runegate.getGateType() == RunegateType.CHAOS))
continue;
for (Runegate thisGate : Runegate.getRunegates()) {
rgLoc = thisGate.getGateType().getGateBuilding().getLoc();
rgLoc = runegate.gateBuilding.getLoc();
float distanceSquaredToRunegate = player.getLoc().distanceSquared2D(rgLoc);
if (distanceSquaredToRunegate < sqr(dist))
rg = thisGate.getGateType().getGateBuilding();
rg = runegate.gateBuilding;
}
}
//nearest runegate found. teleport characterTarget
if (rg != null) {