mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:16:51 +02:00
changed away script to make you active if you turn on your mic
This commit is contained in:
parent
9261df5c24
commit
5c6ea082db
1 changed files with 13 additions and 5 deletions
|
@ -223,8 +223,8 @@ function setAwayProperties() {
|
||||||
|
|
||||||
function setActiveProperties() {
|
function setActiveProperties() {
|
||||||
isAway = false;
|
isAway = false;
|
||||||
if (!wasMuted) {
|
if ((Audio.muted === true) && (wasMuted === false)) {
|
||||||
Audio.muted = !Audio.muted;
|
Audio.muted = false;
|
||||||
}
|
}
|
||||||
MyAvatar.setEnableMeshVisible(true); // IWBNI we respected Developer->Avatar->Draw Mesh setting.
|
MyAvatar.setEnableMeshVisible(true); // IWBNI we respected Developer->Avatar->Draw Mesh setting.
|
||||||
stopAwayAnimation();
|
stopAwayAnimation();
|
||||||
|
@ -314,6 +314,13 @@ function setEnabled(value) {
|
||||||
isEnabled = value;
|
isEnabled = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkAudioToggled() {
|
||||||
|
if (isAway && !Audio.muted) {
|
||||||
|
goActive();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
|
var CHANNEL_AWAY_ENABLE = "Hifi-Away-Enable";
|
||||||
var handleMessage = function(channel, message, sender) {
|
var handleMessage = function(channel, message, sender) {
|
||||||
if (channel === CHANNEL_AWAY_ENABLE && sender === MyAvatar.sessionUUID) {
|
if (channel === CHANNEL_AWAY_ENABLE && sender === MyAvatar.sessionUUID) {
|
||||||
|
@ -327,6 +334,7 @@ Messages.messageReceived.connect(handleMessage);
|
||||||
var maybeIntervalTimer = Script.setInterval(function() {
|
var maybeIntervalTimer = Script.setInterval(function() {
|
||||||
maybeMoveOverlay();
|
maybeMoveOverlay();
|
||||||
maybeGoAway();
|
maybeGoAway();
|
||||||
|
checkAudioToggled();
|
||||||
}, BASIC_TIMER_INTERVAL);
|
}, BASIC_TIMER_INTERVAL);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue