prevent entering vehicles with interact key when starting a conversation
This commit is contained in:
parent
baa68240c5
commit
26729c6f61
|
@ -475,6 +475,8 @@ pub fn handle_input(
|
|||
let player_entity = player.get_single().unwrap();
|
||||
|
||||
if keyboard_input.just_pressed(settings.key_interact) {
|
||||
let mut done = false;
|
||||
|
||||
// Talking to people
|
||||
let objects: Vec<(chat::Talker, &Transform)> = q_talker
|
||||
.iter()
|
||||
|
@ -487,10 +489,12 @@ pub fn handle_input(
|
|||
ew_conv.send(chat::StartConversationEvent {
|
||||
talker: talker.clone(),
|
||||
});
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Entering Vehicles
|
||||
if q_player_drives.is_empty() {
|
||||
if !done && q_player_drives.is_empty() {
|
||||
// Sort vehicles by their distance to the player
|
||||
let objects: Vec<((Entity, &Actor, Option<&MessageOnVehicleEntry>), &Transform)> =
|
||||
q_vehicles
|
||||
|
|
Loading…
Reference in a new issue