block selecting overlays with other hand

This commit is contained in:
David Back 2018-07-31 17:18:35 -07:00
parent ad9ec26781
commit e8068fea0a

View file

@ -963,13 +963,15 @@ function handleOverlaySelectionToolUpdates(channel, message, sender) {
var data = JSON.parse(message);
if (data.method === "selectOverlay") {
if (wantDebug) {
print("setting selection to overlay " + data.overlayID);
}
var entity = entityIconOverlayManager.findEntity(data.overlayID);
if (!selectionDisplay.triggered() || selectionDisplay.triggeredHand === data.hand) {
if (wantDebug) {
print("setting selection to overlay " + data.overlayID);
}
var entity = entityIconOverlayManager.findEntity(data.overlayID);
if (entity !== null) {
selectionManager.setSelections([entity]);
if (entity !== null) {
selectionManager.setSelections([entity]);
}
}
}
}