From 1f4aed31f19dae5beb2938771f84f748a4675461 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Thu, 1 Mar 2018 16:16:47 -0800 Subject: [PATCH 1/5] adding hyperlink --- interface/src/Application.cpp | 1 + .../controllerModules/farActionGrabEntity.js | 7 ++++++- scripts/system/libraries/controllerDispatcherUtils.js | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 34cdf3cda8..1291b4aab0 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6121,6 +6121,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe scriptEngine->registerGlobalObject("Selection", DependencyManager::get().data()); scriptEngine->registerGlobalObject("ContextOverlay", DependencyManager::get().data()); scriptEngine->registerGlobalObject("Wallet", DependencyManager::get().data()); + scriptEngine->registerGlobalObject("AddressManager", DependencyManager::get().data()); qScriptRegisterMetaType(scriptEngine.data(), OverlayIDtoScriptValue, OverlayIDfromScriptValue); diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntity.js b/scripts/system/controllers/controllerModules/farActionGrabEntity.js index b72a38f986..1fcf98a78e 100644 --- a/scripts/system/controllers/controllerModules/farActionGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farActionGrabEntity.js @@ -449,11 +449,16 @@ Script.include("/~/system/libraries/Xform.js"); if (rayPickInfo.type === Picks.INTERSECTED_ENTITY) { if (controllerData.triggerClicks[this.hand]) { var entityID = rayPickInfo.objectID; + var targetProps = Entities.getEntityProperties(entityID, [ "dynamic", "shapeType", "position", "rotation", "dimensions", "density", - "userData", "locked", "type" + "userData", "locked", "type", "href" ]); + if (targetProps.href !== "") { + AddressManager.handleLookupString(targetProps.href); + return makeRunningValues(false, [], []); + } this.targetObject = new TargetObject(entityID, targetProps); this.targetObject.parentProps = getEntityParents(targetProps); diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index 915cfc05fb..96d9e919da 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -233,6 +233,16 @@ entityIsDistanceGrabbable = function(props) { return true; }; +entityHasHyperlink = function(entityID) { + var hasHyperlink = false; + var desiredProperties = ["href"]; + var entityProperties = Entities.getEntityProperties(entityID, desiredProperties); + print(entityProperties.href); + if (entityProperties.href !== "") { + hasHyperlink = true; + } + return hasHyperlink; +} getControllerJointIndex = function (hand) { if (HMD.isHandControllerAvailable()) { @@ -398,6 +408,7 @@ if (typeof module !== 'undefined') { entityIsGrabbable: entityIsGrabbable, NEAR_GRAB_RADIUS: NEAR_GRAB_RADIUS, projectOntoOverlayXYPlane: projectOntoOverlayXYPlane, + entityHasHyperlink: entityHasHyperlink, projectOntoEntityXYPlane: projectOntoEntityXYPlane, TRIGGER_OFF_VALUE: TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE: TRIGGER_ON_VALUE From 05fb3cfd9a09f5b21e3a608c41ded35186acc817 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 2 Mar 2018 14:03:24 -0800 Subject: [PATCH 2/5] fixing hyper link for entities --- .../nearGrabHyperLinkEntity.js | 93 +++++++++++++++++++ .../system/controllers/controllerScripts.js | 3 +- .../libraries/controllerDispatcherUtils.js | 3 +- 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js diff --git a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js new file mode 100644 index 0000000000..64a626f978 --- /dev/null +++ b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js @@ -0,0 +1,93 @@ +"use strict"; + +// nearActionGrabEntity.js +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html + +/* global Script, Entities, MyAvatar, Controller, RIGHT_HAND, LEFT_HAND, + getControllerJointIndex, getGrabbableData, enableDispatcherModule, disableDispatcherModule, + propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, entityIsGrabbable, + Quat, Vec3, MSECS_PER_SEC, getControllerWorldLocation, makeDispatcherModuleParameters, makeRunningValues, + TRIGGER_OFF_VALUE, NEAR_GRAB_RADIUS, findGroupParent, entityIsCloneable, propsAreCloneDynamic, cloneEntity, + HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, BUMPER_ON_VALUE +*/ + +(function() { + Script.include("/~/system/libraries/controllerDispatcherUtils.js"); + Script.include("/~/system/libraries/controllers.js"); + + function NearGrabHyperLinkEntity(hand) { + this.hand = hand; + this.targetEntityID = null; + this.hyperlink = ""; + + this.parameters = makeDispatcherModuleParameters( + 485, + this.hand === RIGHT_HAND ? ["rightHand"] : ["leftHand"], + [], + 100); + + + this.getTargetProps = function(controllerData) { + var nearbyEntitiesProperties = controllerData.nearbyEntityProperties[this.hand]; + var sensorScaleFactor = MyAvatar.sensorToWorldScale; + for (var i = 0; i < nearbyEntitiesProperties.length; i++) { + var props = nearbyEntitiesProperties[i]; + if (props.distance > NEAR_GRAB_RADIUS * sensorScaleFactor) { + continue; + } + if (props.href !== "" && props.href !== undefined) { + return props; + } + } + return null; + }; + + this.isReady = function(controllerData) { + this.targetEntityID = null; + if (controllerData.triggerValues[this.hand] < TRIGGER_OFF_VALUE && + controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) { + return makeRunningValues(false, [], []); + } + + var targetProps = this.getTargetProps(controllerData); + if (targetProps) { + this.hyperlink = targetProps.href; + this.targetEntityID = targetProps.id; + return makeRunningValues(true, [], []); + } + + return makeRunningValues(false, [], []); + }; + + this.run = function(controllerData) { + if ((controllerData.triggerClicks[this.hand] < TRIGGER_OFF_VALUE && + controllerData.secondaryValues[this.hand] < TRIGGER_OFF_VALUE) || this.hyperlink === "") { + return makeRunningValues(false, [], []); + } + + if (controllerData.triggerClicks[this.hand] || + controllerData.secondaryValues[this.hand] > BUMPER_ON_VALUE) { + AddressManager.handleLookupString(this.hyperlink); + return makeRunningValues(false, [], []); + } + + return makeRunningValues(true, [], []); + }; + } + + var leftNearGrabHyperLinkEntity = new NearGrabHyperLinkEntity(LEFT_HAND); + var rightNearGrabHyperLinkEntity = new NearGrabHyperLinkEntity(RIGHT_HAND); + + enableDispatcherModule("LeftNearGrabHyperLink", leftNearGrabHyperLinkEntity); + enableDispatcherModule("RightNearGrabHyperLink", rightNearGrabHyperLinkEntity); + + function cleanup() { + disableDispatcherModule("LeftNearGrabHyperLink"); + disableDispactherModule("RightNearGrabHyperLink"); + + } + + Script.scriptEnding.connect(cleanup); +}()); diff --git a/scripts/system/controllers/controllerScripts.js b/scripts/system/controllers/controllerScripts.js index 1eb30bbefd..8db8e29f37 100644 --- a/scripts/system/controllers/controllerScripts.js +++ b/scripts/system/controllers/controllerScripts.js @@ -31,7 +31,8 @@ var CONTOLLER_SCRIPTS = [ "controllerModules/scaleAvatar.js", "controllerModules/hudOverlayPointer.js", "controllerModules/mouseHMD.js", - "controllerModules/scaleEntity.js" + "controllerModules/scaleEntity.js", + "controllerModules/nearGrabHyperLinkEntity.js" ]; var DEBUG_MENU_ITEM = "Debug defaultScripts.js"; diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index 96d9e919da..efae2edb43 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -105,7 +105,8 @@ DISPATCHER_PROPERTIES = [ "density", "dimensions", "userData", - "type" + "type", + "href" ]; // priority -- a lower priority means the module will be asked sooner than one with a higher priority in a given update step From 5dc336bfae5f68f3e3da09f49c7941011457ab39 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 2 Mar 2018 14:23:35 -0800 Subject: [PATCH 3/5] remove dead code and eslint files --- .../controllerModules/farActionGrabEntity.js | 7 ++++--- .../controllerModules/nearGrabHyperLinkEntity.js | 4 ++-- .../system/libraries/controllerDispatcherUtils.js | 12 ------------ 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/scripts/system/controllers/controllerModules/farActionGrabEntity.js b/scripts/system/controllers/controllerModules/farActionGrabEntity.js index 1fcf98a78e..495c8a87a4 100644 --- a/scripts/system/controllers/controllerModules/farActionGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farActionGrabEntity.js @@ -14,7 +14,7 @@ PICK_MAX_DISTANCE, COLORS_GRAB_SEARCHING_HALF_SQUEEZE, COLORS_GRAB_SEARCHING_FULL_SQUEEZE, COLORS_GRAB_DISTANCE_HOLD, DEFAULT_SEARCH_SPHERE_DISTANCE, TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE, ZERO_VEC, ensureDynamic, getControllerWorldLocation, projectOntoEntityXYPlane, ContextOverlay, HMD, Reticle, Overlays, isPointingAtUI - Picks, makeLaserLockInfo Xform, makeLaserParams + Picks, makeLaserLockInfo Xform, makeLaserParams, AddressManager, getEntityParents */ Script.include("/~/system/libraries/controllerDispatcherUtils.js"); @@ -375,7 +375,7 @@ Script.include("/~/system/libraries/Xform.js"); return true; } return false; - } + }; this.isReady = function (controllerData) { if (HMD.active) { @@ -485,7 +485,8 @@ Script.include("/~/system/libraries/Xform.js"); this.grabbedDistance = rayPickInfo.distance; } - if (otherFarGrabModule.grabbedThingID === this.grabbedThingID && otherFarGrabModule.distanceHolding) { + if (otherFarGrabModule.grabbedThingID === this.grabbedThingID && + otherFarGrabModule.distanceHolding) { this.prepareDistanceRotatingData(controllerData); this.distanceRotate(otherFarGrabModule); } else { diff --git a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js index 64a626f978..bbd111489f 100644 --- a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js +++ b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js @@ -10,7 +10,7 @@ propsArePhysical, Messages, HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, entityIsGrabbable, Quat, Vec3, MSECS_PER_SEC, getControllerWorldLocation, makeDispatcherModuleParameters, makeRunningValues, TRIGGER_OFF_VALUE, NEAR_GRAB_RADIUS, findGroupParent, entityIsCloneable, propsAreCloneDynamic, cloneEntity, - HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, BUMPER_ON_VALUE + HAPTIC_PULSE_STRENGTH, HAPTIC_PULSE_DURATION, BUMPER_ON_VALUE, AddressManager */ (function() { @@ -85,7 +85,7 @@ function cleanup() { disableDispatcherModule("LeftNearGrabHyperLink"); - disableDispactherModule("RightNearGrabHyperLink"); + disableDispatcherModule("RightNearGrabHyperLink"); } diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index efae2edb43..75e1d6668b 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -234,17 +234,6 @@ entityIsDistanceGrabbable = function(props) { return true; }; -entityHasHyperlink = function(entityID) { - var hasHyperlink = false; - var desiredProperties = ["href"]; - var entityProperties = Entities.getEntityProperties(entityID, desiredProperties); - print(entityProperties.href); - if (entityProperties.href !== "") { - hasHyperlink = true; - } - return hasHyperlink; -} - getControllerJointIndex = function (hand) { if (HMD.isHandControllerAvailable()) { var controllerJointIndex = -1; @@ -409,7 +398,6 @@ if (typeof module !== 'undefined') { entityIsGrabbable: entityIsGrabbable, NEAR_GRAB_RADIUS: NEAR_GRAB_RADIUS, projectOntoOverlayXYPlane: projectOntoOverlayXYPlane, - entityHasHyperlink: entityHasHyperlink, projectOntoEntityXYPlane: projectOntoEntityXYPlane, TRIGGER_OFF_VALUE: TRIGGER_OFF_VALUE, TRIGGER_ON_VALUE: TRIGGER_ON_VALUE From d12a4f0c18e80f45411e71c44d67b777b9a0c875 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Fri, 2 Mar 2018 14:30:02 -0800 Subject: [PATCH 4/5] little change --- .../controllers/controllerModules/nearGrabHyperLinkEntity.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js index bbd111489f..59ce79cfd1 100644 --- a/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js +++ b/scripts/system/controllers/controllerModules/nearGrabHyperLinkEntity.js @@ -1,6 +1,8 @@ "use strict"; -// nearActionGrabEntity.js +// nearGrabHyperLinkEntity.js +// +// Created by Dante Ruiz on 03/02/2018 // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html From 85b4c3b4229ea3cf975790c123d760fe0808c39b Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 2 Mar 2018 17:10:14 -0800 Subject: [PATCH 5/5] Protect session UUID from concurrent read/writes --- domain-server/src/DomainServer.cpp | 2 +- domain-server/src/DomainServer.h | 2 +- libraries/networking/src/LimitedNodeList.cpp | 28 +++++++++----------- libraries/networking/src/LimitedNodeList.h | 17 +++++++----- libraries/networking/src/NodeList.cpp | 12 ++++----- 5 files changed, 31 insertions(+), 30 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index d2ef1a4156..c27ac09d15 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -405,7 +405,7 @@ void DomainServer::restart() { exit(DomainServer::EXIT_CODE_REBOOT); } -const QUuid& DomainServer::getID() { +QUuid DomainServer::getID() { return DependencyManager::get()->getSessionUUID(); } diff --git a/domain-server/src/DomainServer.h b/domain-server/src/DomainServer.h index afe2a1cc7c..6e9fe28c0a 100644 --- a/domain-server/src/DomainServer.h +++ b/domain-server/src/DomainServer.h @@ -135,7 +135,7 @@ signals: void userDisconnected(); private: - const QUuid& getID(); + QUuid getID(); void parseCommandLine(); QString getContentBackupDir(); diff --git a/libraries/networking/src/LimitedNodeList.cpp b/libraries/networking/src/LimitedNodeList.cpp index 9dbbc570dd..0803e380f2 100644 --- a/libraries/networking/src/LimitedNodeList.cpp +++ b/libraries/networking/src/LimitedNodeList.cpp @@ -49,19 +49,8 @@ const std::set SOLO_NODE_TYPES = { }; LimitedNodeList::LimitedNodeList(int socketListenPort, int dtlsListenPort) : - _sessionUUID(), - _nodeHash(), - _nodeMutex(QReadWriteLock::Recursive), _nodeSocket(this), - _dtlsSocket(NULL), - _localSockAddr(), - _publicSockAddr(), - _stunSockAddr(STUN_SERVER_HOSTNAME, STUN_SERVER_PORT), - _packetReceiver(new PacketReceiver(this)), - _numCollectedPackets(0), - _numCollectedBytes(0), - _packetStatTimer(), - _permissions(NodePermissions()) + _packetReceiver(new PacketReceiver(this)) { qRegisterMetaType("ConnectionStep"); auto port = (socketListenPort != INVALID_PORT) ? socketListenPort : LIMITED_NODELIST_LOCAL_PORT.get(); @@ -122,13 +111,22 @@ LimitedNodeList::LimitedNodeList(int socketListenPort, int dtlsListenPort) : } } +QUuid LimitedNodeList::getSessionUUID() const { + QReadLocker lock { &_sessionUUIDLock }; + return _sessionUUID; +} + void LimitedNodeList::setSessionUUID(const QUuid& sessionUUID) { - QUuid oldUUID = _sessionUUID; - _sessionUUID = sessionUUID; + QUuid oldUUID; + { + QWriteLocker lock { &_sessionUUIDLock }; + oldUUID = _sessionUUID; + _sessionUUID = sessionUUID; + } if (sessionUUID != oldUUID) { qCDebug(networking) << "NodeList UUID changed from" << uuidStringWithoutCurlyBraces(oldUUID) - << "to" << uuidStringWithoutCurlyBraces(_sessionUUID); + << "to" << uuidStringWithoutCurlyBraces(sessionUUID); emit uuidChanged(sessionUUID, oldUUID); } } diff --git a/libraries/networking/src/LimitedNodeList.h b/libraries/networking/src/LimitedNodeList.h index 1b1c809279..7165b3dd63 100644 --- a/libraries/networking/src/LimitedNodeList.h +++ b/libraries/networking/src/LimitedNodeList.h @@ -104,7 +104,7 @@ public: }; Q_ENUM(ConnectionStep); - const QUuid& getSessionUUID() const { return _sessionUUID; } + QUuid getSessionUUID() const; void setSessionUUID(const QUuid& sessionUUID); void setPermissions(const NodePermissions& newPermissions); @@ -380,20 +380,19 @@ protected: bool sockAddrBelongsToNode(const HifiSockAddr& sockAddr) { return findNodeWithAddr(sockAddr) != SharedNodePointer(); } - QUuid _sessionUUID; NodeHash _nodeHash; - mutable QReadWriteLock _nodeMutex; + mutable QReadWriteLock _nodeMutex { QReadWriteLock::Recursive }; udt::Socket _nodeSocket; - QUdpSocket* _dtlsSocket; + QUdpSocket* _dtlsSocket { nullptr }; HifiSockAddr _localSockAddr; HifiSockAddr _publicSockAddr; - HifiSockAddr _stunSockAddr; + HifiSockAddr _stunSockAddr { STUN_SERVER_HOSTNAME, STUN_SERVER_PORT }; bool _hasTCPCheckedLocalSocket { false }; PacketReceiver* _packetReceiver; - std::atomic _numCollectedPackets; - std::atomic _numCollectedBytes; + std::atomic _numCollectedPackets { 0 }; + std::atomic _numCollectedBytes { 0 }; QElapsedTimer _packetStatTimer; NodePermissions _permissions; @@ -424,6 +423,10 @@ private slots: void flagTimeForConnectionStep(ConnectionStep connectionStep, quint64 timestamp); void possiblyTimeoutSTUNAddressLookup(); void addSTUNHandlerToUnfiltered(); // called once STUN socket known + +private: + mutable QReadWriteLock _sessionUUIDLock; + QUuid _sessionUUID; }; #endif // hifi_LimitedNodeList_h diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 9ad0cb5e79..71d448ede9 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -798,7 +798,7 @@ void NodeList::sendIgnoreRadiusStateToNode(const SharedNodePointer& destinationN void NodeList::ignoreNodeBySessionID(const QUuid& nodeID, bool ignoreEnabled) { // enumerate the nodes to send a reliable ignore packet to each that can leverage it - if (!nodeID.isNull() && _sessionUUID != nodeID) { + if (!nodeID.isNull() && getSessionUUID() != nodeID) { eachMatchingNode([](const SharedNodePointer& node)->bool { if (node->getType() == NodeType::AudioMixer || node->getType() == NodeType::AvatarMixer) { return true; @@ -851,7 +851,7 @@ void NodeList::ignoreNodeBySessionID(const QUuid& nodeID, bool ignoreEnabled) { void NodeList::removeFromIgnoreMuteSets(const QUuid& nodeID) { // don't remove yourself, or nobody - if (!nodeID.isNull() && _sessionUUID != nodeID) { + if (!nodeID.isNull() && getSessionUUID() != nodeID) { { QWriteLocker ignoredSetLocker{ &_ignoredSetLock }; _ignoredNodeIDs.unsafe_erase(nodeID); @@ -870,7 +870,7 @@ bool NodeList::isIgnoringNode(const QUuid& nodeID) const { void NodeList::personalMuteNodeBySessionID(const QUuid& nodeID, bool muteEnabled) { // cannot personal mute yourself, or nobody - if (!nodeID.isNull() && _sessionUUID != nodeID) { + if (!nodeID.isNull() && getSessionUUID() != nodeID) { auto audioMixer = soloNodeOfType(NodeType::AudioMixer); if (audioMixer) { if (isIgnoringNode(nodeID)) { @@ -970,7 +970,7 @@ void NodeList::maybeSendIgnoreSetToNode(SharedNodePointer newNode) { void NodeList::setAvatarGain(const QUuid& nodeID, float gain) { // cannot set gain of yourself - if (_sessionUUID != nodeID) { + if (getSessionUUID() != nodeID) { auto audioMixer = soloNodeOfType(NodeType::AudioMixer); if (audioMixer) { // setup the packet @@ -1013,7 +1013,7 @@ void NodeList::kickNodeBySessionID(const QUuid& nodeID) { // send a request to domain-server to kick the node with the given session ID // the domain-server will handle the persistence of the kick (via username or IP) - if (!nodeID.isNull() && _sessionUUID != nodeID ) { + if (!nodeID.isNull() && getSessionUUID() != nodeID ) { if (getThisNodeCanKick()) { // setup the packet auto kickPacket = NLPacket::create(PacketType::NodeKickRequest, NUM_BYTES_RFC4122_UUID, true); @@ -1036,7 +1036,7 @@ void NodeList::kickNodeBySessionID(const QUuid& nodeID) { void NodeList::muteNodeBySessionID(const QUuid& nodeID) { // cannot mute yourself, or nobody - if (!nodeID.isNull() && _sessionUUID != nodeID ) { + if (!nodeID.isNull() && getSessionUUID() != nodeID ) { if (getThisNodeCanKick()) { auto audioMixer = soloNodeOfType(NodeType::AudioMixer); if (audioMixer) {