clear target when entering targeted vehicle
This commit is contained in:
parent
5ae8c7dc25
commit
3b82ed22a3
|
@ -474,6 +474,7 @@ pub fn handle_vehicle_enter_exit(
|
||||||
commands.entity(driver).remove::<PlayerCamera>();
|
commands.entity(driver).remove::<PlayerCamera>();
|
||||||
commands.entity(driver).remove::<Collider>();
|
commands.entity(driver).remove::<Collider>();
|
||||||
commands.entity(driver).insert(JustNowEnteredVehicle);
|
commands.entity(driver).insert(JustNowEnteredVehicle);
|
||||||
|
commands.entity(vehicle).remove::<hud::IsTargeted>();
|
||||||
commands.entity(vehicle).insert(PlayerCamera);
|
commands.entity(vehicle).insert(PlayerCamera);
|
||||||
commands.entity(vehicle).insert(PlayerDrivesThis);
|
commands.entity(vehicle).insert(PlayerDrivesThis);
|
||||||
if let Ok(mut flashlight_vis) = q_playerflashlight.get_single_mut() {
|
if let Ok(mut flashlight_vis) = q_playerflashlight.get_single_mut() {
|
||||||
|
|
Loading…
Reference in a new issue