200~攻击前校验有效目标

This commit is contained in:
王鹏
2026-03-25 17:48:20 +08:00
parent 88c8201009
commit 10ebf0b2cf
4 changed files with 35 additions and 7 deletions

View File

@@ -304,10 +304,11 @@ class CoordinatePatrol:
# 2. 距离判断
dist = self.get_distance(current_pos, target_pos)
if dist < threshold:
# 到点后保持平滑过渡:不松开 W只松开左右修正键
# 避免 patrol 连续多点时出现“刹一下再走”的抖动。
# 到点后停止前进:松开 W避免到达后仍持续向前移动
# (该函数被 death/logistics 等模块用于“到点就交互/停止”。)
pydirectinput.keyUp("a")
pydirectinput.keyUp("d")
pydirectinput.keyUp("w")
self.reset_stuck()
return True