mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevent inventory collect events from firing on keyup, which is causing item pickup actions to be called twice.
This commit is contained in:
parent
830fa3e9e0
commit
f34894087a
@ -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::<comp::Pos>(),
|
||||
|
Loading…
Reference in New Issue
Block a user