From f06241bab7f037a68dedef888db548951a2bfdcb Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 21 一月 2025 14:09:21 +0800
Subject: [PATCH] 10263 【越南】【英文】【BT】【砍树】后端支持NPC仿真实玩家战斗和快速战斗(优化镜像玩家移动)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
index edea7e9..0cc8438 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -493,8 +493,11 @@
 # @param tagY 目标Y
 # @return 返回值, 距离
 # @remarks 获得2点间距离(勾股定理)
-def GetDistEx(posX, posY, tagX, tagY):
-    return GetFloatUpper(math.sqrt(pow(posX - tagX, 2) + pow(posY - tagY, 2)))
+def GetDistEx(posX, posY, tagX, tagY, toInt=True):
+    dist = math.sqrt(pow(posX - tagX, 2) + pow(posY - tagY, 2))
+    if not toInt:
+        return dist
+    return GetFloatUpper(dist)
 
 #---------------------------------------------------------------------
 ##概率相关, 这个事件是否能够出现

--
Gitblit v1.8.0