mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 01:53:10 +02:00
Prevent 2 avatars from staying seated in the same chair
This commit is contained in:
parent
4c75680877
commit
eccc9ff47c
1 changed files with 7 additions and 1 deletions
|
@ -156,7 +156,10 @@
|
||||||
MyAvatar.removeAnimationStateHandler(this.animStateHandlerID);
|
MyAvatar.removeAnimationStateHandler(this.animStateHandlerID);
|
||||||
Script.update.disconnect(this, this.update);
|
Script.update.disconnect(this, this.update);
|
||||||
|
|
||||||
this.setSeatUser(null);
|
if (MyAvatar.sessionUUID === this.getSeatUser()) {
|
||||||
|
this.setSeatUser(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings.getValue(SETTING_KEY) === this.entityID) {
|
if (Settings.getValue(SETTING_KEY) === this.entityID) {
|
||||||
Settings.setValue(SETTING_KEY, "");
|
Settings.setValue(SETTING_KEY, "");
|
||||||
|
|
||||||
|
@ -261,6 +264,9 @@
|
||||||
shouldStandUp = true;
|
shouldStandUp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MyAvatar.sessionUUID !== this.getSeatUser()) {
|
||||||
|
shouldStandUp = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (shouldStandUp || avatarDistance > RELEASE_DISTANCE) {
|
if (shouldStandUp || avatarDistance > RELEASE_DISTANCE) {
|
||||||
print("IK error: " + ikError + ", distance from chair: " + avatarDistance);
|
print("IK error: " + ikError + ", distance from chair: " + avatarDistance);
|
||||||
|
|
Loading…
Reference in a new issue