mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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) {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue