Skip to content

Commit

Permalink
Switch pather and i_char move back to original logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezro committed Jun 27, 2022
1 parent 4b1fa52 commit 50b3e92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/char/i_char.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,13 @@ def pre_move(self):

def move(self, pos_monitor: tuple[float, float], force_tp: bool = False, force_move: bool = False):
factor = Config().advanced_options["pathing_delay_factor"]
if SkillName.Teleport in hotkeys.right_skill_key_map and force_tp:
if SkillName.Teleport in hotkeys.right_skill_key_map and (
force_tp
or (
skills.is_right_skill_selected(["TELEPORT"])
and skills.is_right_skill_active()
)
):
self._set_active_skill("right", "teleport")
mouse.move(pos_monitor[0], pos_monitor[1], randomize=3, delay_factor=[factor*0.1, factor*0.14])
wait(0.012, 0.02)
Expand Down
2 changes: 1 addition & 1 deletion src/pather.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def traverse_nodes_fixed(self, key: str | list[tuple[float, float]], char: IChar
x_m += int(random.random() * 6 - 3)
y_m += int(random.random() * 6 - 3)
t0 = grab(force_new=True)
char.move((x_m, y_m), force_tp=True)
char.move((x_m, y_m))
t1 = grab(force_new=True)
# check difference between the two frames to determine if tele was good or not
diff = cv2.absdiff(t0, t1)
Expand Down

0 comments on commit 50b3e92

Please sign in to comment.