Reconnect patrol to nearest forward waypoint after combat

This commit is contained in:
王鹏
2026-04-23 15:54:52 +08:00
parent f2eaedbc7e
commit e0ca04b52f

View File

@@ -764,6 +764,11 @@ class AutoBotMove:
if self._was_in_combat_or_target: if self._was_in_combat_or_target:
# 此时已彻底脱战,执行拾取 # 此时已彻底脱战,执行拾取
self.execute_disengage_loot() self.execute_disengage_loot()
current_pos = None
if state.get('x') is not None and state.get('y') is not None:
current_pos = (state.get('x'), state.get('y'))
if current_pos is not None:
self.patrol_controller.snap_to_forward_waypoint(current_pos)
# 扫尾动作执行完后,本 tick 强制结束,防止立即按下 Tab # 扫尾动作执行完后,本 tick 强制结束,防止立即按下 Tab
self._was_in_combat_or_target = False self._was_in_combat_or_target = False