Some transform update fixes.

Thanks to MartinRJ and Henri for updateXform poking.
This commit is contained in:
Siana Gearz
2013-02-17 15:23:25 +01:00
parent dc3f91b121
commit ef4c7d9433
2 changed files with 18 additions and 10 deletions

View File

@@ -557,6 +557,12 @@ F32 LLDrawable::updateXform(BOOL undamped)
mVObjp->dirtySpatialGroup(); mVObjp->dirtySpatialGroup();
} }
} }
else if (!isRoot() && (
dist_vec_squared(old_pos, target_pos) > 0.f
|| old_rot != target_rot ))
{ //fix for BUG-860, MAINT-2275, MAINT-1742, MAINT-2247
gPipeline.markRebuild(this, LLDrawable::REBUILD_POSITION, TRUE);
}
else if (!getVOVolume() && !isAvatar()) else if (!getVOVolume() && !isAvatar())
{ {
movePartition(); movePartition();

View File

@@ -1445,8 +1445,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
val = (U16 *) &data[count]; val = (U16 *) &data[count];
#endif #endif
new_angv.set(U16_to_F32(val[VX], -size, size), new_angv.set(U16_to_F32(val[VX], -size, size),
U16_to_F32(val[VY], -size, size), U16_to_F32(val[VY], -size, size),
U16_to_F32(val[VZ], -size, size)); U16_to_F32(val[VZ], -size, size));
setAngularVelocity(new_angv); setAngularVelocity(new_angv);
break; break;
@@ -1471,9 +1471,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f); new_rot.mQ[VZ] = U8_to_F32(data[11], -1.f, 1.f);
new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f); new_rot.mQ[VW] = U8_to_F32(data[12], -1.f, 1.f);
setAngularVelocity( U8_to_F32(data[13], -size, size), new_angv.set(U8_to_F32(data[13], -size, size),
U8_to_F32(data[14], -size, size), U8_to_F32(data[14], -size, size),
U8_to_F32(data[15], -size, size) ); U8_to_F32(data[15], -size, size) );
setAngularVelocity(new_angv);
break; break;
} }
@@ -1545,9 +1546,10 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
dp->unpackU16(val[VX], "AccX"); dp->unpackU16(val[VX], "AccX");
dp->unpackU16(val[VY], "AccY"); dp->unpackU16(val[VY], "AccY");
dp->unpackU16(val[VZ], "AccZ"); dp->unpackU16(val[VZ], "AccZ");
setAngularVelocity( U16_to_F32(val[VX], -64.f, 64.f), new_angv.set(U16_to_F32(val[VX], -64.f, 64.f),
U16_to_F32(val[VY], -64.f, 64.f), U16_to_F32(val[VY], -64.f, 64.f),
U16_to_F32(val[VZ], -64.f, 64.f)); U16_to_F32(val[VZ], -64.f, 64.f));
setAngularVelocity(new_angv);
} }
break; break;
case OUT_FULL_COMPRESSED: case OUT_FULL_COMPRESSED:
@@ -1591,8 +1593,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
if (value & 0x80) if (value & 0x80)
{ {
dp->unpackVector3(vec, "Omega"); dp->unpackVector3(new_angv, "Omega");
setAngularVelocity(vec); setAngularVelocity(new_angv);
} }
if (value & 0x20) if (value & 0x20)