Skip to content

Commit

Permalink
Use WalkingDistance in TalkToTowner
Browse files Browse the repository at this point in the history
  • Loading branch information
vlolteanu authored and AJenbo committed Jun 2, 2021
1 parent f1a3ace commit cc9783b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/towners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cc9783b

Please sign in to comment.