diff --git a/public/modules/ice.js b/public/modules/ice.js index d1127825..8dbbeeb3 100644 --- a/public/modules/ice.js +++ b/public/modules/ice.js @@ -12,6 +12,7 @@ window.Ice = (function () { // Generate glaciers and icebergs based on temperature and height function generate() { + clear(); const {cells, features} = grid; const {temp, h} = cells; Math.random = aleaPRNG(seed); @@ -31,8 +32,7 @@ window.Ice = (function () { isolines[type].polygons.forEach(points => { const clipped = clipPoly(points); pack.ice.glaciers.push({ - points: clipped, - offset: null + points: clipped }); }); } diff --git a/public/modules/ui/heightmap-editor.js b/public/modules/ui/heightmap-editor.js index 3c3d0a6e..6fe69b78 100644 --- a/public/modules/ui/heightmap-editor.js +++ b/public/modules/ui/heightmap-editor.js @@ -468,7 +468,6 @@ function editHeightmap(options) { }); // recalculate ice - Ice.clear(); Ice.generate(); drawIce();