mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:29:03 +02:00
missing reset flag on end equip, remove mouseEquip check on unequip via U
This commit is contained in:
parent
a869b58dfb
commit
3a35fa1c08
1 changed files with 4 additions and 3 deletions
|
@ -579,6 +579,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
|
||||||
this.targetEntityID = null;
|
this.targetEntityID = null;
|
||||||
this.messageGrabEntity = false;
|
this.messageGrabEntity = false;
|
||||||
this.grabEntityProps = null;
|
this.grabEntityProps = null;
|
||||||
|
this.mouseEquip = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.updateInputs = function (controllerData) {
|
this.updateInputs = function (controllerData) {
|
||||||
|
@ -796,7 +797,7 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
|
||||||
if (intersection.intersects) {
|
if (intersection.intersects) {
|
||||||
var entityProperties = Entities.getEntityProperties(intersection.entityID, DISPATCHER_PROPERTIES);
|
var entityProperties = Entities.getEntityProperties(intersection.entityID, DISPATCHER_PROPERTIES);
|
||||||
if (entityProperties.parentID === EMPTY_PARENT_ID) {
|
if (entityProperties.parentID === EMPTY_PARENT_ID) {
|
||||||
entityProperties.id = intersection.entityID;
|
entityProperties.id = intersection.entityID;
|
||||||
var rightHandPosition = MyAvatar.getJointPosition("RightHand");
|
var rightHandPosition = MyAvatar.getJointPosition("RightHand");
|
||||||
var leftHandPosition = MyAvatar.getJointPosition("LeftHand");
|
var leftHandPosition = MyAvatar.getJointPosition("LeftHand");
|
||||||
var distanceToRightHand = Vec3.distance(entityProperties.position, rightHandPosition);
|
var distanceToRightHand = Vec3.distance(entityProperties.position, rightHandPosition);
|
||||||
|
@ -819,10 +820,10 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
|
||||||
|
|
||||||
var onKeyPress = function(event) {
|
var onKeyPress = function(event) {
|
||||||
if (event.text === UNEQUIP_KEY) {
|
if (event.text === UNEQUIP_KEY) {
|
||||||
if (rightEquipEntity.mouseEquip) {
|
if (rightEquipEntity.targetEntityID) {
|
||||||
rightEquipEntity.endEquipEntity();
|
rightEquipEntity.endEquipEntity();
|
||||||
}
|
}
|
||||||
if (leftEquipEntity.mouseEquip) {
|
if (leftEquipEntity.targetEntityID) {
|
||||||
leftEquipEntity.endEquipEntity();
|
leftEquipEntity.endEquipEntity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue