From ecb9886882b0d06323c17aa292836d4c48ef3345 Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Sun, 23 Jul 2023 02:37:15 +0300 Subject: [PATCH] Fix focus_car --- src/core/Client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/Client.py b/src/core/Client.py index 4513f12..31583f6 100644 --- a/src/core/Client.py +++ b/src/core/Client.py @@ -409,6 +409,7 @@ class Client: self.log.debug(f"Unicycle spawn accepted: car_id={car_id}") else: self.log.debug(f"Car spawn accepted: car_id={car_id}") + self._focus_car = car_id self._cars[car_id] = { "packet": pkt, "json": car_json, @@ -547,7 +548,7 @@ class Client: case "m": # Move focus car self.log.debug(f"Move focus to: {raw_data}") - cid, car_id = self._get_cid_vid(raw_data) + cid, car_id = self._get_cid_vid(raw_data[5:]) if car_id != -1 and cid == self.cid and self._cars[car_id]: self._focus_car = car_id await self._send(raw_data, to_all=True, to_self=True)