MCPcopy Create free account
hub / github.com/SunOner/sunone_aimbot / init

Function init

run.py:47–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 return next(results, None)
46
47def init():
48 run_checks()
49 from logic.capture import capture
50 from logic.visual import visuals
51 from logic.frame_parser import frameParser
52 from logic.hotkeys_watcher import hotkeys_watcher
53 from logic.shooting import shooting
54
55 tracker = ByteTrackTracker() if not cfg.disable_tracker else None
56
57 try:
58 model = YOLO(f"models/{cfg.AI_model_name}", task="detect")
59 except Exception as e:
60 logger.error(f"An error occurred when loading the AI model:\n{e}")
61 raise SystemExit(0)
62
63 while True:
64 image = capture.get_new_frame()
65
66 if image is None:
67 continue
68
69 if cfg.circle_capture:
70 image = capture.convert_to_circle(image)
71
72 if hotkeys_watcher.app_pause != 0:
73 visuals.clear()
74 shooting.shoot(False, False)
75 if cfg.show_window or cfg.show_overlay:
76 visuals.submit_frame(image)
77 continue
78
79 result = perform_detection(model, image, tracker)
80 frameParser.parse(result)
81
82 if cfg.show_window or cfg.show_overlay:
83 visuals.submit_frame(image)
84
85if __name__ == "__main__":
86 init()

Callers 1

run.pyFile · 0.85

Calls 8

run_checksFunction · 0.90
perform_detectionFunction · 0.85
get_new_frameMethod · 0.80
convert_to_circleMethod · 0.80
clearMethod · 0.80
shootMethod · 0.80
submit_frameMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected