Merge pull request #7925 from sethalves/overlay-or-grab-not-both

fix mouse-grab moving both an overlay and an entity at the same time
This commit is contained in:
Brad Hefta-Gaub 2016-05-19 17:38:32 -07:00
commit 8ff7af28be

View file

@ -316,7 +316,12 @@ Grabber.prototype.pressEvent = function(event) {
return;
}
if (event.isLeftButton!==true ||event.isRightButton===true || event.isMiddleButton===true) {
if (event.isLeftButton !== true || event.isRightButton === true || event.isMiddleButton === true) {
return;
}
if (Overlays.getOverlayAtPoint(Reticle.position) > 0) {
// the mouse is pointing at an overlay; don't look for entities underneath the overlay.
return;
}