Commits

Stinson Linden  committed c3abcd5

PATH-842: Another tweak to get the llSetTargetOmega functionality working in the viewer.

  • Participants
  • Parent commits 6aeba68

Comments (0)

Files changed (2)

File indra/newview/llviewerobject.cpp

 	{
 		if (new_angv != old_angv)
 		{
-			resetRot();
+			resetRotTime();
 		}
 
 		// Set the rotation of the object followed by adjusting for the accumulated angular velocity (llSetTargetOmega)
 	}
 }
 
+void LLViewerObject::resetRotTime()
+{
+	mRotTime = 0.0f;
+}
+
 void LLViewerObject::resetRot()
 {
-	mRotTime = 0.0f;
+	resetRotTime();
 
 	// Reset the accumulated angular velocity rotation
 	mAngularVelocityRot.loadIdentity(); 

File indra/newview/llviewerobject.h

 	virtual BOOL		updateLOD();
 	virtual BOOL		setDrawableParent(LLDrawable* parentp);
 	F32					getRotTime() { return mRotTime; }
+private:
+	void				resetRotTime();
+public:
 	void				resetRot();
 	void				applyAngularVelocity(F32 dt);
 
 	LLViewerRegion* getRegion() const				{ return mRegionp; }
 
 	BOOL isSelected() const							{ return mUserSelected; }
-	virtual void setSelected(BOOL sel)				{ mUserSelected = sel; mRotTime = 0.f;}
+	virtual void setSelected(BOOL sel)				{ mUserSelected = sel; resetRot();}
 
 	const LLUUID &getID() const						{ return mID; }
 	U32 getLocalID() const							{ return mLocalID; }