mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 20:32:21 +02:00
move isInEditMode guard to setState
This commit is contained in:
parent
15394056eb
commit
d20ac20ff2
1 changed files with 3 additions and 3 deletions
|
@ -842,14 +842,14 @@ function MyController(hand) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.callEntityMethodOnGrabbed = function(entityMethodName) {
|
this.callEntityMethodOnGrabbed = function(entityMethodName) {
|
||||||
if (isInEditMode()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
||||||
Entities.callEntityMethod(this.grabbedEntity, entityMethodName, args);
|
Entities.callEntityMethod(this.grabbedEntity, entityMethodName, args);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setState = function(newState, reason) {
|
this.setState = function(newState, reason) {
|
||||||
|
if (isInEditMode() && newState !== STATE_OFF && newState !== STATE_SEARCHING) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setGrabCommunications((newState === STATE_DISTANCE_HOLDING) || (newState === STATE_NEAR_GRABBING));
|
setGrabCommunications((newState === STATE_DISTANCE_HOLDING) || (newState === STATE_NEAR_GRABBING));
|
||||||
if (WANT_DEBUG || WANT_DEBUG_STATE) {
|
if (WANT_DEBUG || WANT_DEBUG_STATE) {
|
||||||
var oldStateName = stateToName(this.state);
|
var oldStateName = stateToName(this.state);
|
||||||
|
|
Loading…
Reference in a new issue