200~攻击前校验有效目标
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user