From f34894087aee38d5d488c0e0ff2cb888f67fccc2 Mon Sep 17 00:00:00 2001 From: Shane Handley Date: Sat, 1 Aug 2020 20:21:16 +1000 Subject: [PATCH] Prevent inventory collect events from firing on keyup, which is causing item pickup actions to be called twice. --- voxygen/src/session.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index e531fa04a2..67a859e6fa 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -478,7 +478,7 @@ impl PlayState for SessionState { } } }, - Event::InputUpdate(GameInput::Interact, state) => { + Event::InputUpdate(GameInput::Interact, true) => { let mut client = self.client.borrow_mut(); // Collect terrain sprites @@ -493,7 +493,7 @@ impl PlayState for SessionState { .get(client.entity()) .copied(); - if let (Some(player_pos), true) = (player_pos, state) { + if let Some(player_pos) = player_pos { let entity = ( &client.state().ecs().entities(), &client.state().ecs().read_storage::(),