Skip to content

Commit

Permalink
Wall thickness tweak for different cell_size vals
Browse files Browse the repository at this point in the history
  • Loading branch information
theomgdev committed Dec 11, 2021
1 parent 6d58a83 commit 957385d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/EnvironmentController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 957385d

Please sign in to comment.