Revert "Another potential fix for construction"
This reverts commit c2c63adb
This commit is contained in:
@@ -267,16 +267,10 @@ public final class HouseManager {
|
|||||||
int diffX = player.getLocation().getX() - r.getBaseLocation().getX();
|
int diffX = player.getLocation().getX() - r.getBaseLocation().getX();
|
||||||
int diffY = player.getLocation().getY() - r.getBaseLocation().getY();
|
int diffY = player.getLocation().getY() - r.getBaseLocation().getY();
|
||||||
int diffZ = player.getLocation().getZ() - r.getBaseLocation().getZ();
|
int diffZ = player.getLocation().getZ() - r.getBaseLocation().getZ();
|
||||||
DynamicRegion dr = region;
|
|
||||||
DynamicRegion dd = dungeon;
|
|
||||||
RegionManager.getRegionCache().remove(dr);
|
|
||||||
RegionManager.getRegionCache().remove(dd);
|
|
||||||
region = null;
|
region = null;
|
||||||
dungeon = null;
|
dungeon = null;
|
||||||
enter(player, buildingMode, false);
|
enter(player, buildingMode, false);
|
||||||
player.getProperties().setTeleportLocation((player.getViewport().getRegion() == dungeon ? dungeon : region).getBaseLocation().transform(diffX, diffY, diffZ));
|
player.getProperties().setTeleportLocation((player.getViewport().getRegion() == dungeon ? dungeon : region).getBaseLocation().transform(diffX, diffY, diffZ));
|
||||||
dr.flagInactive();
|
|
||||||
dd.flagInactive();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -315,19 +315,11 @@ public class Region {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Unloads a region - compatibility method for older uses
|
|
||||||
*/
|
|
||||||
private static void unload(Region r){
|
|
||||||
unload(r, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unloads a region.
|
* Unloads a region.
|
||||||
* @param r The region.
|
* @param r The region.
|
||||||
*/
|
*/
|
||||||
private static void unload(Region r, boolean force) {
|
private static void unload(Region r) {
|
||||||
if(!force){
|
|
||||||
if (r.isViewed()) {
|
if (r.isViewed()) {
|
||||||
SystemLogger.logErr("Players viewing region!");
|
SystemLogger.logErr("Players viewing region!");
|
||||||
r.flagActive();
|
r.flagActive();
|
||||||
@@ -340,7 +332,6 @@ public class Region {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for (RegionPlane p : r.planes) {
|
for (RegionPlane p : r.planes) {
|
||||||
p.clear();
|
p.clear();
|
||||||
if (!(r instanceof DynamicRegion)) {
|
if (!(r instanceof DynamicRegion)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user