mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 02:03:36 +02:00
Fix multiple and malingering tool icons
This commit is contained in:
parent
c201e7b65a
commit
f4b2e399ef
2 changed files with 9 additions and 5 deletions
|
@ -60,7 +60,6 @@ ToolIcon = function (side) {
|
|||
var handJointIndex,
|
||||
iconProperties;
|
||||
|
||||
// Joint index.
|
||||
handJointIndex = MyAvatar.getJointIndex(HAND_JOINT_NAME);
|
||||
if (handJointIndex === -1) {
|
||||
// Don't display if joint isn't available (yet) to attach to.
|
||||
|
@ -69,10 +68,14 @@ ToolIcon = function (side) {
|
|||
return;
|
||||
}
|
||||
|
||||
iconProperties = Object.clone(ICON_PROPERTIES);
|
||||
iconProperties.parentJointIndex = handJointIndex;
|
||||
iconProperties.color = ICON_COLORS[icon];
|
||||
iconOverlay = Overlays.addOverlay(ICON_TYPE, iconProperties);
|
||||
if (iconOverlay === null) {
|
||||
iconProperties = Object.clone(ICON_PROPERTIES);
|
||||
iconProperties.parentJointIndex = handJointIndex;
|
||||
iconProperties.color = ICON_COLORS[icon];
|
||||
iconOverlay = Overlays.addOverlay(ICON_TYPE, iconProperties);
|
||||
} else {
|
||||
Overlays.editOverlay(iconOverlay, { color: ICON_COLORS[icon] });
|
||||
}
|
||||
}
|
||||
|
||||
function clear() {
|
||||
|
|
|
@ -227,6 +227,7 @@
|
|||
function clear() {
|
||||
leftInputs.setUIEntities([]);
|
||||
rightInputs.setUIEntities([]);
|
||||
toolIcon.clear();
|
||||
toolMenu.clear();
|
||||
createPalette.clear();
|
||||
|
||||
|
|
Loading…
Reference in a new issue