mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Removed distance check from sprite colelction event handling as it is already checked when entering state.
This commit is contained in:
parent
6b71133c50
commit
c66e1b3a56
@ -188,21 +188,6 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
|
||||
|
||||
if let Some(block) = block {
|
||||
if block.is_collectible() && state.can_set_block(pos) {
|
||||
// Check if the block is within pickup range
|
||||
let entity_cylinder = get_cylinder(state, entity);
|
||||
if !within_pickup_range(entity_cylinder, || {
|
||||
Some(find_dist::Cube {
|
||||
min: pos.as_(),
|
||||
side_length: 1.0,
|
||||
})
|
||||
}) {
|
||||
debug!(
|
||||
?entity_cylinder,
|
||||
"Failed to pick up block as not within range, block pos: {}", pos
|
||||
);
|
||||
return;
|
||||
};
|
||||
|
||||
if let Some(item) = comp::Item::try_reclaim_from_block(block) {
|
||||
// NOTE: We dup the item for message purposes.
|
||||
let item_msg = item.duplicate(
|
||||
|
Loading…
Reference in New Issue
Block a user