This commit is contained in:
Seth Alves 2015-10-13 14:13:53 -07:00
parent 8b72f6e7c6
commit fcbb107bc0
3 changed files with 9 additions and 8 deletions

View file

@ -63,11 +63,8 @@ void AvatarActionHold::updateActionWorker(float deltaTimeStep) {
if (gotLock) {
gotLock = withTryWriteLock([&]{
if (_positionalTarget != position || _rotationalTarget != rotation) {
auto ownerEntity = _ownerEntity.lock();
_positionalTarget = position;
_rotationalTarget = rotation;
}
_positionalTarget = position;
_rotationalTarget = rotation;
});
}

View file

@ -370,7 +370,12 @@ inline QDebug operator<<(QDebug debug, const EntityItemProperties& properties) {
DEBUG_PROPERTY_IF_CHANGED(debug, properties, VoxelSurfaceStyle, voxelSurfaceStyle, "");
DEBUG_PROPERTY_IF_CHANGED(debug, properties, Href, href, "");
DEBUG_PROPERTY_IF_CHANGED(debug, properties, Description, description, "");
DEBUG_PROPERTY_IF_CHANGED(debug, properties, ActionData, actionData, "");
// DEBUG_PROPERTY_IF_CHANGED(debug, properties, ActionData, actionData, "");
if (properties.actionDataChanged()) {
debug << " " << "actionData" << ":" << properties.getActionData().toHex() << "" << "\n";
}
DEBUG_PROPERTY_IF_CHANGED(debug, properties, XTextureURL, xTextureURL, "");
DEBUG_PROPERTY_IF_CHANGED(debug, properties, YTextureURL, yTextureURL, "");
DEBUG_PROPERTY_IF_CHANGED(debug, properties, ZTextureURL, zTextureURL, "");

View file

@ -38,6 +38,7 @@ ObjectActionSpring::~ObjectActionSpring() {
}
void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) {
// don't risk hanging the thread running the physics simulation
auto lockResult = withTryReadLock([&]{
auto ownerEntity = _ownerEntity.lock();
if (!ownerEntity) {
@ -100,9 +101,7 @@ void ObjectActionSpring::updateActionWorker(btScalar deltaTimeStep) {
}
});
if (!lockResult) {
// don't risk hanging the thread running the physics simulation
qDebug() << "ObjectActionSpring::updateActionWorker lock failed";
return;
}
}