mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 13:24:04 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into avatars-can-collide
This commit is contained in:
commit
034ceab4d3
4 changed files with 9 additions and 3 deletions
|
@ -253,6 +253,8 @@ inline void EntityItemProperties::setPosition(const glm::vec3& value)
|
||||||
|
|
||||||
inline QDebug operator<<(QDebug debug, const EntityItemProperties& properties) {
|
inline QDebug operator<<(QDebug debug, const EntityItemProperties& properties) {
|
||||||
debug << "EntityItemProperties[" << "\n";
|
debug << "EntityItemProperties[" << "\n";
|
||||||
|
|
||||||
|
debug << " _type:" << properties.getType() << "\n";
|
||||||
|
|
||||||
// TODO: figure out why position and animationSettings don't seem to like the macro approach
|
// TODO: figure out why position and animationSettings don't seem to like the macro approach
|
||||||
if (properties.containsPositionChange()) {
|
if (properties.containsPositionChange()) {
|
||||||
|
|
|
@ -332,10 +332,12 @@
|
||||||
T _##n; \
|
T _##n; \
|
||||||
bool _##n##Changed;
|
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) \
|
#define DEBUG_PROPERTY_IF_CHANGED(D, P, N, n, x) \
|
||||||
if (P.n##Changed()) { \
|
if (P.n##Changed()) { \
|
||||||
D << " " << #n << ":" << P.get##N() << x << "\n"; \
|
D << " " << #n << ":" << P.get##N() << x << "\n"; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // hifi_EntityItemPropertiesMacros_h
|
#endif // hifi_EntityItemPropertiesMacros_h
|
||||||
|
|
|
@ -201,7 +201,7 @@ EntityItem* EntityTree::addEntity(const EntityItemID& entityID, const EntityItem
|
||||||
// construct the instance of the entity
|
// construct the instance of the entity
|
||||||
EntityTypes::EntityType type = properties.getType();
|
EntityTypes::EntityType type = properties.getType();
|
||||||
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
if (recordCreationTime) {
|
if (recordCreationTime) {
|
||||||
result->recordCreationTime();
|
result->recordCreationTime();
|
||||||
|
|
|
@ -77,7 +77,9 @@ EntityItem* EntityTypes::constructEntityItem(EntityType entityType, const Entity
|
||||||
factory = _factories[entityType];
|
factory = _factories[entityType];
|
||||||
}
|
}
|
||||||
if (factory) {
|
if (factory) {
|
||||||
newEntityItem = factory(entityID, properties);
|
EntityItemProperties mutableProperties = properties;
|
||||||
|
mutableProperties.markAllChanged();
|
||||||
|
newEntityItem = factory(entityID, mutableProperties);
|
||||||
}
|
}
|
||||||
return newEntityItem;
|
return newEntityItem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue