mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 02:53:43 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into island
This commit is contained in:
commit
23c69ad9e1
7 changed files with 25 additions and 13 deletions
|
@ -26,6 +26,7 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
|
|||
|
||||
project(hifi)
|
||||
add_definitions(-DGLM_FORCE_RADIANS)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
|
||||
if (WIN32)
|
||||
add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS)
|
||||
|
|
|
@ -33,8 +33,7 @@ AddressManager::AddressManager() :
|
|||
_rootPlaceName(),
|
||||
_rootPlaceID(),
|
||||
_positionGetter(NULL),
|
||||
_orientationGetter(NULL),
|
||||
_localDSPortSharedMem(NULL)
|
||||
_orientationGetter(NULL)
|
||||
{
|
||||
connect(qApp, &QCoreApplication::aboutToQuit, this, &AddressManager::storeCurrentAddress);
|
||||
}
|
||||
|
@ -331,13 +330,6 @@ bool AddressManager::handleNetworkAddress(const QString& lookupString) {
|
|||
|
||||
quint16 domainPort = DEFAULT_DOMAIN_SERVER_PORT;
|
||||
|
||||
if (domainHostname == "localhost") {
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->getLocalServerPortFromSharedMemory(DOMAIN_SERVER_LOCAL_PORT_SMEM_KEY,
|
||||
_localDSPortSharedMem,
|
||||
domainPort);
|
||||
}
|
||||
|
||||
if (!hostnameRegex.cap(2).isEmpty()) {
|
||||
domainPort = (qint16) hostnameRegex.cap(2).toInt();
|
||||
}
|
||||
|
|
|
@ -95,8 +95,6 @@ private:
|
|||
QUuid _rootPlaceID;
|
||||
PositionGetter _positionGetter;
|
||||
OrientationGetter _orientationGetter;
|
||||
|
||||
QSharedMemory* _localDSPortSharedMem; // memory shared with domain server
|
||||
};
|
||||
|
||||
#endif // hifi_AddressManager_h
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
void setSockAddr(const HifiSockAddr& sockAddr, const QString& hostname);
|
||||
|
||||
unsigned short getPort() const { return _sockAddr.getPort(); }
|
||||
void setPort(quint16 port) { _sockAddr.setPort(port); }
|
||||
|
||||
const QUuid& getAssignmentUUID() const { return _assignmentUUID; }
|
||||
void setAssignmentUUID(const QUuid& assignmentUUID) { _assignmentUUID = assignmentUUID; }
|
||||
|
|
|
@ -392,8 +392,9 @@ void LimitedNodeList::killNodeWithUUID(const QUuid& nodeUUID) {
|
|||
|
||||
_nodeMutex.unlock();
|
||||
|
||||
QWriteLocker writeLocker(&_nodeMutex);
|
||||
_nodeMutex.lockForWrite();
|
||||
_nodeHash.unsafe_erase(it);
|
||||
_nodeMutex.unlock();
|
||||
|
||||
handleNodeKill(matchingNode);
|
||||
} else {
|
||||
|
|
|
@ -277,6 +277,23 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
|
||||
if (!_domainHandler.isConnected()) {
|
||||
qDebug() << "Sending connect request to domain-server at" << _domainHandler.getHostname();
|
||||
|
||||
// is this our localhost domain-server?
|
||||
// if so we need to make sure we have an up-to-date local port in case it restarted
|
||||
|
||||
if (_domainHandler.getSockAddr().getAddress() == QHostAddress::LocalHost
|
||||
|| _domainHandler.getHostname() == "localhost") {
|
||||
|
||||
static QSharedMemory* localDSPortSharedMem = NULL;
|
||||
|
||||
quint16 domainPort = DEFAULT_DOMAIN_SERVER_PORT;
|
||||
getLocalServerPortFromSharedMemory(DOMAIN_SERVER_LOCAL_PORT_SMEM_KEY,
|
||||
localDSPortSharedMem,
|
||||
domainPort);
|
||||
qDebug() << "Local domain-server port read from shared memory (or default) is" << domainPort;
|
||||
_domainHandler.setPort(domainPort);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// construct the DS check in packet
|
||||
|
|
|
@ -66,7 +66,9 @@ QDataStream& operator>>(QDataStream& in, glm::quat& quaternion) {
|
|||
}
|
||||
|
||||
// less common utils can be enabled with DEBUG
|
||||
#ifdef DEBUG
|
||||
// FIXME, remove the second defined clause once these compile, or remove the
|
||||
// functions.
|
||||
#if defined(DEBUG) && defined(FIXED_STREAMS)
|
||||
|
||||
std::ostream& operator<<(std::ostream& s, const CollisionInfo& c) {
|
||||
s << "{penetration=" << c._penetration
|
||||
|
|
Loading…
Reference in a new issue