diff --git a/binaries/data/mods/public/maps/random/rmgen2/setup.js b/binaries/data/mods/public/maps/random/rmgen2/setup.js index 1e70f4ecd8..75a31a787d 100644 --- a/binaries/data/mods/public/maps/random/rmgen2/setup.js +++ b/binaries/data/mods/public/maps/random/rmgen2/setup.js @@ -133,14 +133,6 @@ function resetTerrain(terrain, tc, elevation) g_MapInfo.mapHeight = elevation; } -/** - * Euclidian distance between two points. - */ -function euclid_distance(x1, z1, x2, z2) -{ - return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(z2 - z1, 2)); -} - /** * Chose starting locations for the given players. * @@ -445,7 +437,7 @@ function placeRandom(playerIDs) var tooClose = false; for (var j = 0; j < placed.length; ++j) { - var sep = euclid_distance(x, z, placed[j].x, placed[j].z); + var sep = getDistance(x, z, placed[j].x, placed[j].z); if (sep < 0.25) { tooClose = true;