From cc9783b8d9d20d7ebd859bb005daf8adb2d8d2eb Mon Sep 17 00:00:00 2001 From: Vladimir Olteanu Date: Wed, 2 Jun 2021 11:25:48 +0300 Subject: [PATCH] Use WalkingDistance in TalkToTowner --- Source/towners.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/towners.cpp b/Source/towners.cpp index 14b82c554..476137c2c 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -899,8 +899,7 @@ void TalkToTowner(PlayerStruct &player, int t) { auto &towner = towners[t]; - Point distance = player.position.tile - towner.position; - if (abs(distance.x) >= 2 || abs(distance.y) >= 2) + if (player.position.tile.WalkingDistance(towner.position) >= 2) return; if (pcurs >= CURSOR_FIRSTITEM) {