@@ -14,14 +14,13 @@ import {
14
14
AEntity ,
15
15
Networked ,
16
16
MediaLoader ,
17
- Deletable ,
18
- PenActive
17
+ Deletable
19
18
} from "../bit-components" ;
20
19
import { canMove } from "../utils/permissions-utils" ;
21
20
import { canMove as canMoveEntity } from "../utils/bit-permissions-utils" ;
22
21
import { isPinned } from "../bit-systems/networking" ;
23
22
import { takeOwnership } from "../utils/take-ownership" ;
24
- import { anyEntityWith , findAncestorWithComponents } from "../utils/bit-utils" ;
23
+ import { findAncestorWithComponents } from "../utils/bit-utils" ;
25
24
26
25
const GRAB_REMOTE_RIGHT = paths . actions . cursor . right . grab ;
27
26
const DROP_REMOTE_RIGHT = paths . actions . cursor . right . drop ;
@@ -88,8 +87,7 @@ function grab(world, userinput, queryHovered, held, grabPath) {
88
87
target &&
89
88
userinput . get ( grabPath ) &&
90
89
( ! isEntityPinned || AFRAME . scenes [ 0 ] . is ( "frozen" ) ) &&
91
- hasPermissionToGrab ( world , target ) &&
92
- ! anyEntityWith ( world , PenActive )
90
+ hasPermissionToGrab ( world , target )
93
91
) {
94
92
if ( hasComponent ( world , Networked , target ) ) {
95
93
takeOwnership ( world , target ) ;
@@ -101,7 +99,7 @@ function grab(world, userinput, queryHovered, held, grabPath) {
101
99
102
100
function drop ( world , userinput , queryHeld , held , dropPath ) {
103
101
const heldEid = queryHeld ( world ) [ 0 ] ;
104
- if ( heldEid && userinput . get ( dropPath ) && ! anyEntityWith ( world , PenActive ) ) {
102
+ if ( heldEid && userinput . get ( dropPath ) ) {
105
103
// TODO: Drop on ownership lost
106
104
removeComponent ( world , held , heldEid ) ;
107
105
0 commit comments