mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +02:00
Prevent calling ending on displayNames if was never started
This commit is contained in:
parent
3fd8a02375
commit
aaa6038d28
1 changed files with 8 additions and 0 deletions
|
@ -128,7 +128,13 @@ function excludeMyAvatar() {
|
|||
rayExclusionList = [MyAvatar.sessionUUID];
|
||||
}
|
||||
|
||||
var runAtLeastOnce = false;
|
||||
|
||||
function ending() {
|
||||
if (!runAtLeastOnce) {
|
||||
return;
|
||||
}
|
||||
|
||||
Controller.touchBeginEvent.disconnect(touchBegin);
|
||||
Controller.touchEndEvent.disconnect(touchEnd);
|
||||
Controller.mousePressEvent.disconnect(touchBegin);
|
||||
|
@ -157,6 +163,8 @@ function init() {
|
|||
|
||||
rayExclusionList = [MyAvatar.sessionUUID];
|
||||
MyAvatar.sessionUUIDChanged.connect(excludeMyAvatar);
|
||||
|
||||
runAtLeastOnce = true;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Reference in a new issue