Merge branch 'master' of https://github.com/highfidelity/hifi into red

This commit is contained in:
samcake 2016-02-12 09:59:48 -08:00
commit 5acfd5ff53
4 changed files with 11 additions and 8 deletions

View file

@ -1073,7 +1073,9 @@ void DomainServer::sendHeartbeatToDataServer(const QString& networkAddress) {
// TODO: have data-web respond with ice-server hostname to use
void DomainServer::sendHeartbeatToIceServer() {
DependencyManager::get<LimitedNodeList>()->sendHeartbeatToIceServer(_iceServerSocket);
if (!_iceServerSocket.getAddress().isNull()) {
DependencyManager::get<LimitedNodeList>()->sendHeartbeatToIceServer(_iceServerSocket);
}
}
void DomainServer::processNodeJSONStatsPacket(QSharedPointer<ReceivedMessage> packetList, SharedNodePointer sendingNode) {

View file

@ -144,9 +144,9 @@ function AttachedEntitiesManager() {
this.handleEntityRelease = function(grabbedEntity, releasedFromJoint) {
// if this is still equipped, just rewrite the position information.
var grabData = getEntityCustomData('grabKey', entityID, {});
var grabData = getEntityCustomData('grabKey', grabbedEntity, {});
if ("refCount" in grabData && grabData.refCount > 0) {
manager.updateRelativeOffsets(parsedMessage.grabbedEntity);
manager.updateRelativeOffsets(grabbedEntity);
return;
}
@ -185,8 +185,8 @@ function AttachedEntitiesManager() {
parentJointIndex: bestJointIndex
};
if (bestJointOffset && bestJointOffset.constructor === Array && bestJointOffset.length > 1) {
if (this.avatarIsInDressingRoom()) {
if (bestJointOffset && bestJointOffset.constructor === Array) {
if (this.avatarIsInDressingRoom() || bestJointOffset.length < 2) {
this.updateRelativeOffsets(grabbedEntity);
} else {
// don't snap the entity to the preferred position if the avatar is in the dressing room.

View file

@ -855,6 +855,7 @@ function MyController(hand) {
getEntityCustomData(GRABBABLE_DATA_KEY, candidateEntities[i], DEFAULT_GRABBABLE_DATA);
var grabDataForCandidate = getEntityCustomData(GRAB_USER_DATA_KEY, candidateEntities[i], {});
var propsForCandidate = Entities.getEntityProperties(candidateEntities[i], GRABBABLE_PROPERTIES);
var near = (nearPickedCandidateEntities.indexOf(candidateEntities[i]) >= 0);
var isPhysical = this.propsArePhysical(propsForCandidate);
var grabbable;
@ -916,7 +917,7 @@ function MyController(hand) {
continue;
}
if (this.state == STATE_SEARCHING && !isPhysical && distance > NEAR_PICK_MAX_DISTANCE) {
if (this.state == STATE_SEARCHING && !isPhysical && distance > NEAR_PICK_MAX_DISTANCE && !near) {
// we can't distance-grab non-physical
if (WANT_DEBUG_SEARCH_NAME && propsForCandidate.name == WANT_DEBUG_SEARCH_NAME) {
print("grab is skipping '" + WANT_DEBUG_SEARCH_NAME + "': not physical and too far for near-grab");

View file

@ -671,7 +671,7 @@ const int NUM_BYTES_STUN_HEADER = 20;
void LimitedNodeList::sendSTUNRequest() {
if (!_stunSockAddr.isNull()) {
if (!_stunSockAddr.getAddress().isNull()) {
const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10;
if (!_hasCompletedInitialSTUN) {
@ -840,7 +840,7 @@ void LimitedNodeList::startSTUNPublicSocketUpdate() {
}
void LimitedNodeList::possiblyTimeoutSTUNAddressLookup() {
if (_stunSockAddr.isNull()) {
if (_stunSockAddr.getAddress().isNull()) {
// our stun address is still NULL, but we've been waiting for long enough - time to force a fail
stopInitialSTUNUpdate(false);
}