From 3b82ed22a3f57665c3aa3182d2ed005a240a0f49 Mon Sep 17 00:00:00 2001 From: yuni Date: Sun, 16 Jun 2024 23:58:41 +0200 Subject: [PATCH] clear target when entering targeted vehicle --- src/actor.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/actor.rs b/src/actor.rs index f83c529..d362937 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -474,6 +474,7 @@ pub fn handle_vehicle_enter_exit( commands.entity(driver).remove::(); commands.entity(driver).remove::(); commands.entity(driver).insert(JustNowEnteredVehicle); + commands.entity(vehicle).remove::(); commands.entity(vehicle).insert(PlayerCamera); commands.entity(vehicle).insert(PlayerDrivesThis); if let Ok(mut flashlight_vis) = q_playerflashlight.get_single_mut() {