Skip to content

Commit

Permalink
no break if car is recorded (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
Juice-XIJ authored Jun 17, 2022
1 parent 8c9567d commit 3e58aa3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions forza.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from asyncio.windows_events import NULL
import os
import sys
import time
Expand Down Expand Up @@ -391,9 +392,10 @@ def __exp_farming_setup(self, fdp):
self.reset_car = 0

# exp or sp farming to avoid afk detection, 30s interval
if self.farming and time.time() - self.break_timer > 30:
self.threadPool.submit(keyboard_helper.press_brake, self)
self.break_timer = time.time()
if self.shift_point is NULL or len(self.shift_point) == 0:
if self.farming and time.time() - self.break_timer > 30:
self.threadPool.submit(keyboard_helper.press_brake, self)
self.break_timer = time.time()

def run(self, update_tree_func=lambda *args: None, update_car_gui_func=lambda *args: None):
"""run the auto shifting
Expand Down

0 comments on commit 3e58aa3

Please sign in to comment.