From ff7e96f79568d6f5b0ff4bad7da7de40c57481a5 Mon Sep 17 00:00:00 2001
From: Freeyorp <Freeyorp101@hotmail.com>
Date: Sun, 11 Apr 2010 17:15:02 +1200
Subject: Quick fix for when a moved npc goes out of range

---
 src/map/npc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/map/npc.c b/src/map/npc.c
index ab0e7ff..fc994f5 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -915,8 +915,10 @@ int npc_click (struct map_session_data *sd, int id)
         return 1;
     }
 
-    if (npc_checknear (sd, id))
+    if (npc_checknear (sd, id)) {
+        clif_scriptclose (sd, id);
         return 1;
+    }
 
     nd = (struct npc_data *) map_id2bl (id);
 
@@ -957,8 +959,10 @@ int npc_scriptcont (struct map_session_data *sd, int id)
 
     if (id != sd->npc_id)
         return 1;
-    if (npc_checknear (sd, id))
+    if (npc_checknear (sd, id)) {
+        clif_scriptclose (sd, id);
         return 1;
+    }
 
     nd = (struct npc_data *) map_id2bl (id);
 
-- 
cgit v1.2.3-70-g09d2