Mercurial > fife-parpg
comparison engine/core/view/camera.cpp @ 349:493f7492f0ba
Fixed a problem with Camera::render() involving the way it calculates the animation frame number.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 03 Sep 2009 23:22:28 +0000 |
parents | ed1565a5a2a0 |
children | d98e398d3057 |
comparison
equal
deleted
inserted
replaced
348:48c38e92e2bd | 349:493f7492f0ba |
---|---|
544 // there was no static image for instance, trying default action | 544 // there was no static image for instance, trying default action |
545 action = instance->getObject()->getDefaultAction(); | 545 action = instance->getObject()->getDefaultAction(); |
546 if (action) { | 546 if (action) { |
547 int animation_id = action->getVisual<ActionVisual>()->getAnimationIndexByAngle(angle); | 547 int animation_id = action->getVisual<ActionVisual>()->getAnimationIndexByAngle(angle); |
548 Animation& animation = m_apool->getAnimation(animation_id); | 548 Animation& animation = m_apool->getAnimation(animation_id); |
549 unsigned int animtime = instance->getRuntime() % animation.getDuration(); | 549 unsigned int animtime = instance->getActionRuntime() % animation.getDuration(); |
550 image = animation.getFrameByTimestamp(animtime); | 550 image = animation.getFrameByTimestamp(animtime); |
551 } | 551 } |
552 } | 552 } |
553 } | 553 } |
554 if (image) { | 554 if (image) { |