mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 01:23:55 +02:00
use local message
This commit is contained in:
parent
0b6f52f508
commit
04e36f925a
2 changed files with 5 additions and 2 deletions
|
@ -345,7 +345,7 @@ var toolBar = (function() {
|
||||||
if (active && !Entities.canAdjustLocks()) {
|
if (active && !Entities.canAdjustLocks()) {
|
||||||
Window.alert(INSUFFICIENT_PERMISSIONS_ERROR_MSG);
|
Window.alert(INSUFFICIENT_PERMISSIONS_ERROR_MSG);
|
||||||
} else {
|
} else {
|
||||||
Messages.sendMessage("edit-events", JSON.stringify({enabled: active}));
|
Messages.sendLocalMessage("edit-events", JSON.stringify({enabled: active}));
|
||||||
isActive = active;
|
isActive = active;
|
||||||
if (!isActive) {
|
if (!isActive) {
|
||||||
entityListTool.setVisible(false);
|
entityListTool.setVisible(false);
|
||||||
|
|
|
@ -565,13 +565,16 @@ function keyReleaseEvent(event) {
|
||||||
grabber.keyReleaseEvent(event);
|
grabber.keyReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
function editEvent(channel, message, sender) {
|
function editEvent(channel, message, sender, localOnly) {
|
||||||
if (channel != "edit-events") {
|
if (channel != "edit-events") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sender != MyAvatar.sessionUUID) {
|
if (sender != MyAvatar.sessionUUID) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!localOnly) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
data = JSON.parse(message);
|
data = JSON.parse(message);
|
||||||
if ("enabled" in data) {
|
if ("enabled" in data) {
|
||||||
|
|
Loading…
Reference in a new issue