mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:16:56 +02:00
get rid of distance equip
This commit is contained in:
parent
fd4b944458
commit
40f30b9141
1 changed files with 3 additions and 8 deletions
|
@ -1008,7 +1008,7 @@ function MyController(hand) {
|
||||||
this.setState(near ? STATE_NEAR_TRIGGER : STATE_FAR_TRIGGER);
|
this.setState(near ? STATE_NEAR_TRIGGER : STATE_FAR_TRIGGER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// near grab or equip with action
|
// near grab with action or equip
|
||||||
var grabData = getEntityCustomData(GRAB_USER_DATA_KEY, this.grabbedEntity, {});
|
var grabData = getEntityCustomData(GRAB_USER_DATA_KEY, this.grabbedEntity, {});
|
||||||
var refCount = ("refCount" in grabData) ? grabData.refCount : 0;
|
var refCount = ("refCount" in grabData) ? grabData.refCount : 0;
|
||||||
if (near && (refCount < 1 || entityHasActions(this.grabbedEntity))) {
|
if (near && (refCount < 1 || entityHasActions(this.grabbedEntity))) {
|
||||||
|
@ -1020,7 +1020,7 @@ function MyController(hand) {
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// far grab or equip with action
|
// far grab
|
||||||
if (isPhysical && !near) {
|
if (isPhysical && !near) {
|
||||||
if (entityIsGrabbedByOther(this.grabbedEntity)) {
|
if (entityIsGrabbedByOther(this.grabbedEntity)) {
|
||||||
// don't distance grab something that is already grabbed.
|
// don't distance grab something that is already grabbed.
|
||||||
|
@ -1042,12 +1042,7 @@ function MyController(hand) {
|
||||||
intersectionPointToCenterDistance *
|
intersectionPointToCenterDistance *
|
||||||
FAR_TO_NEAR_GRAB_PADDING_FACTOR);
|
FAR_TO_NEAR_GRAB_PADDING_FACTOR);
|
||||||
}
|
}
|
||||||
// this.setState(this.state == STATE_SEARCHING ? STATE_DISTANCE_HOLDING : STATE_EQUIP);
|
this.setState(STATE_DISTANCE_HOLDING);
|
||||||
if (this.state == STATE_SEARCHING) {
|
|
||||||
this.setState(STATE_DISTANCE_HOLDING);
|
|
||||||
} else { // (this.state == STATE_HOLD_SEARCHING)
|
|
||||||
this.setState(STATE_HOLD);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.searchSphereOff();
|
this.searchSphereOff();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue