Merge branch 'master' of github.com:highfidelity/hifi into avatars-can-collide

This commit is contained in:
Seth Alves 2015-03-05 06:39:03 -08:00
commit 034ceab4d3
4 changed files with 9 additions and 3 deletions

View file

@ -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()) {

View file

@ -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

View file

@ -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();

View file

@ -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;
}