From a532a88684f2276d282006361f508e1bbfd77725 Mon Sep 17 00:00:00 2001 From: Piegames <14054505+piegamesde@users.noreply.github.com> Date: Tue, 24 Apr 2018 03:30:32 +0200 Subject: [PATCH] Little tweaks --- Assets/Scripts/Generation/DungeonGenerator.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/Generation/DungeonGenerator.cs b/Assets/Scripts/Generation/DungeonGenerator.cs index 1c5d3fa..49bc83c 100644 --- a/Assets/Scripts/Generation/DungeonGenerator.cs +++ b/Assets/Scripts/Generation/DungeonGenerator.cs @@ -435,10 +435,10 @@ public class DungeonGenerator { } float prob2 = 0.04f; if (UnityEngine.Random.value > 1 - prob2 - && x != r.bounds.x - && x != r.bounds.x + r.bounds.width - && y != r.bounds.y - && y != r.bounds.y + r.bounds.height) + && x > r.bounds.x +1 + && x < r.bounds.x + r.bounds.width-1 + && y > r.bounds.y+1 + && y < r.bounds.y + r.bounds.height-1) { r.spawnpoints.Add(pos); }