From 6277e9391143bad02a25ae85da8c8f786193e175 Mon Sep 17 00:00:00 2001 From: crabman Date: Thu, 15 Aug 2024 13:04:42 +0000 Subject: [PATCH] Allow trading from player to player again --- voxygen/src/session/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/voxygen/src/session/mod.rs b/voxygen/src/session/mod.rs index 63f49c36b8..0bd91f07b2 100644 --- a/voxygen/src/session/mod.rs +++ b/voxygen/src/session/mod.rs @@ -1133,7 +1133,7 @@ impl PlayState for SessionState { match interactable { Interactable::Block(_, _, _) => {}, Interactable::Entity(entity) => { - let can_trade_to = client + let can_trade_to_alignment = client .state() .read_component_cloned::(*entity) .is_some_and(|a| match a { @@ -1148,11 +1148,10 @@ impl PlayState for SessionState { _ => false, }); - if can_trade_to - && let Some(uid) = client - .state() - .ecs() - .uid_from_entity(*entity) + if let Some(uid) = + client.state().ecs().uid_from_entity(*entity) + && (can_trade_to_alignment + || client.player_list().contains_key(&uid)) { let name = client .player_list()