From 957385d9bf500d3d75513aaf0e3ddc768b7ccefc Mon Sep 17 00:00:00 2001 From: M4YX0R Date: Sat, 11 Dec 2021 12:42:09 +0300 Subject: [PATCH] Wall thickness tweak for different cell_size vals --- src/Controllers/EnvironmentController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controllers/EnvironmentController.js b/src/Controllers/EnvironmentController.js index 8a75175..db47cfc 100644 --- a/src/Controllers/EnvironmentController.js +++ b/src/Controllers/EnvironmentController.js @@ -68,7 +68,7 @@ class EnvironmentController extends CanvasController{ var yval = r/this.env.num_rows*(resolution/this.env.renderer.cell_size*(this.env.num_rows/this.env.num_cols)); var noise = Perlin.get(xval, yval); avg_noise += noise/(this.env.num_rows*this.env.num_cols); - if (noise > noise_threshold && noise < noise_threshold + thickness/resolution*(5/this.env.renderer.cell_size)) { + if (noise > noise_threshold && noise < noise_threshold + thickness/resolution) { var cell = this.env.grid_map.cellAt(c, r); if (cell != null) { if(cell.owner != null) cell.owner.die();