mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 00:13:53 +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) {
|
||||
if (isInEditMode()) {
|
||||
return;
|
||||
}
|
||||
var args = [this.hand === RIGHT_HAND ? "right" : "left", MyAvatar.sessionUUID];
|
||||
Entities.callEntityMethod(this.grabbedEntity, entityMethodName, args);
|
||||
};
|
||||
|
||||
this.setState = function(newState, reason) {
|
||||
if (isInEditMode() && newState !== STATE_OFF && newState !== STATE_SEARCHING) {
|
||||
return;
|
||||
}
|
||||
setGrabCommunications((newState === STATE_DISTANCE_HOLDING) || (newState === STATE_NEAR_GRABBING));
|
||||
if (WANT_DEBUG || WANT_DEBUG_STATE) {
|
||||
var oldStateName = stateToName(this.state);
|
||||
|
|
Loading…
Reference in a new issue