Try to fix the remaining ipo issues
This commit is contained in:
parent
a3a5befe63
commit
2b4d062911
@ -47,9 +47,6 @@ private:
|
||||
* one time only (which might get triggered more than once). */
|
||||
enum AnimTimeType { ATT_CYCLIC, ATT_CYCLIC_ONCE } m_anim_type;
|
||||
|
||||
/** The current time used in the IPOs. */
|
||||
float m_current_time;
|
||||
|
||||
/** The inital position of this object. */
|
||||
Vec3 m_initial_xyz;
|
||||
|
||||
@ -67,6 +64,9 @@ protected:
|
||||
|
||||
float m_animation_duration;
|
||||
|
||||
/** The current time used in the IPOs. */
|
||||
float m_current_time;
|
||||
|
||||
public:
|
||||
AnimationBase(const XMLNode &node);
|
||||
AnimationBase(Ipo *ipo);
|
||||
|
@ -75,15 +75,13 @@ void ThreeDAnimation::updateWithWorldTicks()
|
||||
Vec3 xyz = m_object->getPosition();
|
||||
Vec3 scale = m_object->getScale();
|
||||
|
||||
float position = 0.0f;
|
||||
if (!m_is_paused)
|
||||
{
|
||||
int cur_ticks = World::getWorld()->getTicksSinceStart();
|
||||
float cur_time = stk_config->ticks2Time(cur_ticks);
|
||||
position = fmodf(cur_time, m_animation_duration);
|
||||
m_current_time = stk_config->ticks2Time(cur_ticks);
|
||||
}
|
||||
|
||||
AnimationBase::getAt(position, &xyz, &m_hpr, &scale); //updates all IPOs
|
||||
AnimationBase::getAt(m_current_time, &xyz, &m_hpr, &scale); //updates all IPOs
|
||||
//m_node->setPosition(xyz.toIrrVector());
|
||||
//m_node->setScale(scale.toIrrVector());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user