Commit b50f464a authored by hybrid's avatar hybrid

Removed unused member.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2311 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9e695384
......@@ -15,8 +15,8 @@ CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3
const core::vector3df& endPoint, u32 timeForWay,
bool loop, u32 now, bool pingpong)
: ISceneNodeAnimatorFinishing(now + timeForWay),
Start(startPoint), End(endPoint), WayLength(0.0f),
TimeFactor(0.0f), StartTime(now), TimeForWay(timeForWay), Loop(loop), PingPong ( pingpong )
Start(startPoint), End(endPoint), TimeFactor(0.0f), StartTime(now),
TimeForWay(timeForWay), Loop(loop), PingPong(pingpong)
{
#ifdef _DEBUG
setDebugName("CSceneNodeAnimatorFlyStraight");
......@@ -29,10 +29,8 @@ CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3
void CSceneNodeAnimatorFlyStraight::recalculateIntermediateValues()
{
Vector = End - Start;
WayLength = (f32)Vector.getLength();
TimeFactor = (f32)Vector.getLength() / TimeForWay;
Vector.normalize();
TimeFactor = WayLength / TimeForWay;
}
......@@ -96,7 +94,7 @@ void CSceneNodeAnimatorFlyStraight::deserializeAttributes(io::IAttributes* in, i
ISceneNodeAnimator* CSceneNodeAnimatorFlyStraight::createClone(ISceneNode* node, ISceneManager* newManager)
{
CSceneNodeAnimatorFlyStraight * newAnimator =
CSceneNodeAnimatorFlyStraight * newAnimator =
new CSceneNodeAnimatorFlyStraight(Start, End, TimeForWay, Loop, StartTime, PingPong);
return newAnimator;
......
......@@ -32,7 +32,7 @@ namespace scene
//! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_STRAIGHT; }
//! Creates a clone of this animator.
/** Please note that you will have to drop
(IReferenceCounted::drop()) the returned pointer after calling this. */
......@@ -45,7 +45,6 @@ namespace scene
core::vector3df Start;
core::vector3df End;
core::vector3df Vector;
f32 WayLength;
f32 TimeFactor;
u32 StartTime;
u32 TimeForWay;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment