Sync with L2JServer Jan 30th 2015.

This commit is contained in:
mobius
2015-01-31 03:47:34 +00:00
parent acf0c17ba4
commit e7005fbedd
148 changed files with 1922 additions and 1672 deletions

View File

@ -191,9 +191,16 @@ public class GeoData
*/
public int getSpawnHeight(int x, int y, int z)
{
// + 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;
final int geoX = getGeoX(x);
final int geoY = getGeoY(y);
if (!hasGeoPos(geoX, geoY))
{
return z;
}
int nextLowerZ = getNextLowerZ(geoX, geoY, z + 100);
return Math.abs(nextLowerZ - z) <= SPAWN_Z_DELTA_LIMIT ? nextLowerZ : z;
}
/**