From 7463d2c7dcbad5beddabf4cc302f5b9b8ecf7d24 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 12 Aug 2021 12:24:05 +0200 Subject: [PATCH] Update Source/lighting.cpp --- Source/lighting.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/lighting.cpp b/Source/lighting.cpp index b79ebbb20..f80e27397 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -631,10 +631,10 @@ void DoUnVision(Point position, int nRadius) { nRadius++; nRadius++; // increasing the radius even further here prevents leaving stray vision tiles behind and doesn't seem to affect monster AI - applying new vision happens in the same tick - int y1 = std::max(position.y - nRadius, 0); - int y2 = std::min(position.y + nRadius, MAXDUNY); int x1 = std::max(position.x - nRadius, 0); + int y1 = std::max(position.y - nRadius, 0); int x2 = std::min(position.x + nRadius, MAXDUNX); + int y2 = std::min(position.y + nRadius, MAXDUNY); for (int i = x1; i < x2; i++) { for (int j = y1; j < y2; j++) {