init time values before calling fn who use them

This commit is contained in:
Mylloon 2023-04-01 17:18:56 +02:00
parent 3a03d017b4
commit 337487a4eb
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -9,6 +9,10 @@ class Hack():
"""Base class for playing with CSGO memory"""
def __init__(self, offline: bool = False) -> None:
# Time values
self.wait_time = 0.01
self.timeout = self.wait_time * 50
# Loading offsets
self.offsets = self._find_offsets(offline)
@ -18,9 +22,6 @@ class Hack():
# Load process
self.pm = self._find_process(True)
self.wait_time = 0.01
self.timeout = self.wait_time * 50
def _find_offsets(self, offline: bool) -> dict[str, int]:
"""Load CSGO offset from online repository or local file"""
if offline: