# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1264867898 0 # Node ID 219b8036708cc3af97062152c0178b592305c299 # Parent f27880d4c08c990eea60b29e5caf21a15d84c6a0 Fixed a small bug where the facing_angle wasn't being initialized. diff -r f27880d4c08c -r 219b8036708c engine/core/view/camera.cpp --- a/engine/core/view/camera.cpp Fri Jan 29 21:03:51 2010 +0000 +++ b/engine/core/view/camera.cpp Sat Jan 30 16:11:38 2010 +0000 @@ -536,10 +536,11 @@ FL_DBG(_log, "Instance has action"); int animation_id = action->getVisual()->getAnimationIndexByAngle(vc.facing_angle + m_rotation); - int facing_angle; - if (vc.facing_angle < 0){ - facing_angle = 360+vc.facing_angle; //make it a positive angle + int facing_angle = vc.facing_angle; + if (facing_angle < 0){ + facing_angle = 360+facing_angle; //make it a positive angle } + facing_angle %= 360; instance->setRotation(facing_angle); //update so the animation has correct rotation Animation& animation = m_apool->getAnimation(animation_id);