Using reduced SpawnHeight z value to prevent npc spawn issues.

This commit is contained in:
mobius
2015-01-29 13:06:59 +00:00
parent e696c62269
commit 007760a8cb

View File

@@ -191,7 +191,8 @@ public class GeoData
*/
public int getSpawnHeight(int x, int y, int z)
{
int nearestZ = getNearestZ(getGeoX(x), getGeoY(y), z + 100);
// + 30, defend against defective geodata and invalid spawn z
int nearestZ = getNearestZ(getGeoX(x), getGeoY(y), z + 30); // was z + 100
return Math.abs(nearestZ - z) <= SPAWN_Z_DELTA_LIMIT ? nearestZ : z;
}