diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/moveRandomly2.js b/unpublishedScripts/DomainContent/CellScience/Scripts/moveRandomly2.js index f720ca91cc..ec7b249db0 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/moveRandomly2.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/moveRandomly2.js @@ -44,12 +44,6 @@ this.getTotalWait = function() { return (Math.random() * 5000) * 2; - // var avatars = AvatarList.getAvatarIdentifiers(); - // var avatarCount = avatars.length; - // var random = Math.random() * 5000; - // var totalWait = random * (avatarCount * 2); - // print('cellscience color avatarcount, totalwait: ', avatarCount, totalWait) - // return totalWait } @@ -86,7 +80,9 @@ this.unload = function() { - baton.release(function() {}); + if (baton) { + baton.release(function() {}); + } Script.clearInterval(currentInterval); } diff --git a/unpublishedScripts/DomainContent/CellScience/Scripts/zoomAndMoveRandomly.js b/unpublishedScripts/DomainContent/CellScience/Scripts/zoomAndMoveRandomly.js index 16c83b29dd..21e585cd91 100644 --- a/unpublishedScripts/DomainContent/CellScience/Scripts/zoomAndMoveRandomly.js +++ b/unpublishedScripts/DomainContent/CellScience/Scripts/zoomAndMoveRandomly.js @@ -40,7 +40,7 @@ this.minAngularVelocity = 0.01; this.maxAngularVelocity = 0.03; baton = virtualBaton({ - batonName: 'io.highfidelity.vesicles:' + entityId, // One winner for each entity + batonName: 'io.highfidelity.vesicles:' + entityID, // One winner for each entity }); stopUpdateAndReclaim(); currentInterval = Script.setInterval(self.move, self.getTotalWait()) @@ -127,7 +127,10 @@ if (this.initTimeout !== null) { Script.clearTimeout(this.initTimeout); } - baton.release(function() {}); + if (baton) { + baton.release(function() {}); + } + Script.clearInterval(currentInterval); } diff --git a/unpublishedScripts/DomainContent/CellScience/importCellScience.js b/unpublishedScripts/DomainContent/CellScience/importCellScience.js index 63f99c53a3..900a54d9e3 100644 --- a/unpublishedScripts/DomainContent/CellScience/importCellScience.js +++ b/unpublishedScripts/DomainContent/CellScience/importCellScience.js @@ -5,7 +5,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -var version = 1049; +var version = 1051; var cellLayout; var baseLocation = "https://hifi-content.s3.amazonaws.com/DomainContent/CellScience/";