clear target when entering targeted vehicle

This commit is contained in:
yuni 2024-06-16 23:58:41 +02:00
parent 5ae8c7dc25
commit 3b82ed22a3

View file

@ -474,6 +474,7 @@ pub fn handle_vehicle_enter_exit(
commands.entity(driver).remove::<PlayerCamera>();
commands.entity(driver).remove::<Collider>();
commands.entity(driver).insert(JustNowEnteredVehicle);
commands.entity(vehicle).remove::<hud::IsTargeted>();
commands.entity(vehicle).insert(PlayerCamera);
commands.entity(vehicle).insert(PlayerDrivesThis);
if let Ok(mut flashlight_vis) = q_playerflashlight.get_single_mut() {