Scott Lawrence avatar Scott Lawrence committed e41996a Merge

pull back fixes from 3.4.0-beta7

Comments (0)

Files changed (3)

 62b07aa81b1957897c3846292bb9412977b0af6c 3.3.4-beta6
 d02759655d6b36d60f4a927e4bfce82844a82ef5 3.4.0-release
 baa627938dbb7956f45e1eebef11ffe9e7f2e5bc 3.4.1-beta1
+ceed0b65a69f1eac20d523e0203320a32f9a3f3c DRTVWR-215
+733ceac77583874f3626ef7a15c105b83ef0f5bb 3.4.0-beta7

indra/newview/llviewerobject.cpp

 	mTimeDilation(1.f),
 	mRotTime(0.f),
 	mAngularVelocityRot(),
+	mPreviousRotation(),
 	mJointInfo(NULL),
 	mState(0),
 	mMedia(NULL),
 		}
 	}
 
-	if (new_rot != getRotation()
-		|| new_angv != old_angv)
-	{
-		if (new_angv != old_angv)
+	if ((new_rot != getRotation())
+		|| (new_angv != old_angv))
+	{
+		if (new_rot != mPreviousRotation)
+		{
+			resetRot();
+		}
+		else if (new_angv != old_angv)
 		{
 			if (flagUsePhysics() || new_angv.isExactlyZero())
 			{
 			}
 		}
 
+		// Remember the last rotation value
+		mPreviousRotation = new_rot;
+
 		// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
 		setRotation(new_rot * mAngularVelocityRot);
 		setChanged(ROTATED | SILHOUETTE);

indra/newview/llviewerobject.h

 	F32				mTimeDilation;				// Time dilation sent with the object.
 	F32				mRotTime;					// Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
 	LLQuaternion	mAngularVelocityRot;		// accumulated rotation from the angular velocity computations
+	LLQuaternion	mPreviousRotation;
 
 	LLVOJointInfo*  mJointInfo;
 	U8				mState;	// legacy
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.