From 7eba3d5877895f36e841ab7e3205f52c0c33e413 Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Tue, 15 Aug 2023 16:56:41 +0300 Subject: [PATCH] mod time fix --- src/core/Client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/Client.py b/src/core/Client.py index 80456cb..ae74370 100644 --- a/src/core/Client.py +++ b/src/core/Client.py @@ -325,7 +325,7 @@ class Client: self._split_load(half_size, size, True, file, speed) ] sl0, sl1 = await asyncio.gather(*uploads) - tr = time.monotonic() - t + tr = (time.monotonic() - t) or 0.0001 if self.__Core.lock_upload: self.__Core.lock_upload = False msg = i18n.client_mod_sent.format(round(size / MB, 3), math.ceil(size / tr / MB), int(tr)) @@ -515,6 +515,12 @@ class Client: else: self.log.debug(f"Invalid car: car_id={car_id}") + async def reset_car(self, car_id, x, y, z, rot=None): + # TODO: reset_car + self.log.debug(f"Resetting car from plugin") + if rot is None: + rot = {"y": 0, "w": 0, "x": 0, "z": 0} + async def _reset_car(self, raw_data): cid, car_id = self._get_cid_vid(raw_data) if car_id != -1 and cid == self.cid and self._cars[car_id]: