Fixed false faraway notifications

This commit is contained in:
tidwall 2020-03-25 12:47:55 -07:00
parent cd70a3d2af
commit a99df2892a
1 changed files with 1 additions and 0 deletions

View File

@ -420,6 +420,7 @@ func fenceMatchRoam(
// dwelling, more from old-nearbys // dwelling, more from old-nearbys
oldNearbys[i] = oldNearbys[len(oldNearbys)-1] oldNearbys[i] = oldNearbys[len(oldNearbys)-1]
oldNearbys = oldNearbys[:len(oldNearbys)-1] oldNearbys = oldNearbys[:len(oldNearbys)-1]
i--
if fence.nodwell { if fence.nodwell {
// no dwelling allowed, remove from both lists // no dwelling allowed, remove from both lists
newNearbys[j] = newNearbys[len(newNearbys)-1] newNearbys[j] = newNearbys[len(newNearbys)-1]