mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 00:23:33 +02:00
Merge branch 'master' of git://github.com/highfidelity/hifi into 20304
This commit is contained in:
commit
9c1b9b05cf
8 changed files with 30 additions and 19 deletions
|
@ -556,6 +556,7 @@ void DomainServer::populateDefaultStaticAssignmentsExcludingTypes(const QSet<Ass
|
|||
if (!excludedTypes.contains(defaultedType)
|
||||
&& defaultedType != Assignment::UNUSED_0
|
||||
&& defaultedType != Assignment::UNUSED_1
|
||||
&& defaultedType != Assignment::UNUSED_2
|
||||
&& defaultedType != Assignment::AgentType) {
|
||||
// type has not been set from a command line or config file config, use the default
|
||||
// by clearing whatever exists and writing a single default assignment with no payload
|
||||
|
|
|
@ -253,6 +253,8 @@ inline void EntityItemProperties::setPosition(const glm::vec3& value)
|
|||
|
||||
inline QDebug operator<<(QDebug debug, const EntityItemProperties& properties) {
|
||||
debug << "EntityItemProperties[" << "\n";
|
||||
|
||||
debug << " _type:" << properties.getType() << "\n";
|
||||
|
||||
// TODO: figure out why position and animationSettings don't seem to like the macro approach
|
||||
if (properties.containsPositionChange()) {
|
||||
|
|
|
@ -332,10 +332,12 @@
|
|||
T _##n; \
|
||||
bool _##n##Changed;
|
||||
|
||||
#define DEBUG_PROPERTY(D, P, N, n, x) \
|
||||
D << " " << #n << ":" << P.get##N() << x << "[changed:" << P.n##Changed() << "]\n";
|
||||
|
||||
#define DEBUG_PROPERTY_IF_CHANGED(D, P, N, n, x) \
|
||||
if (P.n##Changed()) { \
|
||||
D << " " << #n << ":" << P.get##N() << x << "\n"; \
|
||||
}
|
||||
|
||||
|
||||
#endif // hifi_EntityItemPropertiesMacros_h
|
||||
|
|
|
@ -201,7 +201,7 @@ EntityItem* EntityTree::addEntity(const EntityItemID& entityID, const EntityItem
|
|||
// construct the instance of the entity
|
||||
EntityTypes::EntityType type = properties.getType();
|
||||
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
||||
|
||||
|
||||
if (result) {
|
||||
if (recordCreationTime) {
|
||||
result->recordCreationTime();
|
||||
|
|
|
@ -77,7 +77,9 @@ EntityItem* EntityTypes::constructEntityItem(EntityType entityType, const Entity
|
|||
factory = _factories[entityType];
|
||||
}
|
||||
if (factory) {
|
||||
newEntityItem = factory(entityID, properties);
|
||||
EntityItemProperties mutableProperties = properties;
|
||||
mutableProperties.markAllChanged();
|
||||
newEntityItem = factory(entityID, mutableProperties);
|
||||
}
|
||||
return newEntityItem;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,8 @@ vec4 transformModelToClipPos(TransformCamera camera, TransformObject object, vec
|
|||
return camera._projectionViewUntranslated * epos;
|
||||
// Equivalent to the following but hoppefully a bit more accurate
|
||||
// return camera._projection * camera._view * object._model * pos;
|
||||
|
||||
<@else@>
|
||||
return gl_ModelViewProjectionMatrix * pos;
|
||||
<@endif@>
|
||||
}
|
||||
|
||||
|
@ -50,6 +51,8 @@ vec3 transformModelToEyeDir(TransformCamera camera, TransformObject object, vec3
|
|||
vec3 result = vec3(dot(mvc0, dir), dot(mvc1, dir), dot(mvc2, dir));
|
||||
|
||||
return result;
|
||||
<@else@>
|
||||
return gl_NormalMatrix * dir;
|
||||
<@endif@>
|
||||
}
|
||||
|
||||
|
|
|
@ -153,15 +153,8 @@ void AddressManager::handleLookupString(const QString& lookupString) {
|
|||
if (!lookupString.startsWith('/')) {
|
||||
const QRegExp HIFI_SCHEME_REGEX = QRegExp(HIFI_URL_SCHEME + ":\\/{1,2}", Qt::CaseInsensitive);
|
||||
sanitizedString = sanitizedString.remove(HIFI_SCHEME_REGEX);
|
||||
|
||||
quint16 localDomainServerPort = DEFAULT_DOMAIN_SERVER_PORT;
|
||||
if (sanitizedString == "localhost") {
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->getLocalServerPortFromSharedMemory
|
||||
(DOMAIN_SERVER_LOCAL_PORT_SMEM_KEY, _localDSPortSharedMem, localDomainServerPort);
|
||||
}
|
||||
|
||||
lookupURL = QUrl(HIFI_URL_SCHEME + "://" + sanitizedString + ":" + QString::number(localDomainServerPort));
|
||||
lookupURL = QUrl(HIFI_URL_SCHEME + "://" + sanitizedString);
|
||||
} else {
|
||||
lookupURL = QUrl(lookupString);
|
||||
}
|
||||
|
@ -338,7 +331,15 @@ bool AddressManager::handleNetworkAddress(const QString& lookupString) {
|
|||
if (hostnameRegex.indexIn(lookupString) != -1) {
|
||||
QString domainHostname = hostnameRegex.cap(1);
|
||||
|
||||
qint16 domainPort = DEFAULT_DOMAIN_SERVER_PORT;
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -63,8 +63,8 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks, const glm
|
|||
int vertices = slices * (stacks - 1) + 2;
|
||||
int indices = slices * (stacks - 1) * NUM_VERTICES_PER_TRIANGULATED_QUAD;
|
||||
|
||||
if (registered && (!_registeredSphereVertices.contains(id) || _lastRegisteredSphereVertices[id] != radiusKey)
|
||||
|| !registered && !_sphereVertices.contains(radiusKey)) {
|
||||
if ((registered && (!_registeredSphereVertices.contains(id) || _lastRegisteredSphereVertices[id] != radiusKey))
|
||||
|| (!registered && !_sphereVertices.contains(radiusKey))) {
|
||||
|
||||
if (registered && _registeredSphereVertices.contains(id)) {
|
||||
_registeredSphereVertices[id].clear();
|
||||
|
@ -127,8 +127,8 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks, const glm
|
|||
}
|
||||
#endif
|
||||
|
||||
if (registered && (!_registeredSphereIndices.contains(id) || _lastRegisteredSphereIndices[id] != slicesStacksKey)
|
||||
|| !registered && !_sphereIndices.contains(slicesStacksKey)) {
|
||||
if ((registered && (!_registeredSphereIndices.contains(id) || _lastRegisteredSphereIndices[id] != slicesStacksKey))
|
||||
|| (!registered && !_sphereIndices.contains(slicesStacksKey))) {
|
||||
|
||||
if (registered && _registeredSphereIndices.contains(id)) {
|
||||
_registeredSphereIndices[id].clear();
|
||||
|
@ -213,8 +213,8 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks, const glm
|
|||
}
|
||||
#endif
|
||||
|
||||
if (registered && (!_registeredSphereColors.contains(id) || _lastRegisteredSphereColors[id] != colorKey)
|
||||
|| !registered && !_sphereColors.contains(colorKey)) {
|
||||
if ((registered && (!_registeredSphereColors.contains(id) || _lastRegisteredSphereColors[id] != colorKey))
|
||||
|| (!registered && !_sphereColors.contains(colorKey))) {
|
||||
|
||||
if (registered && _registeredSphereColors.contains(id)) {
|
||||
_registeredSphereColors[id].clear();
|
||||
|
|
Loading…
Reference in a new issue