From 4224d60bbd3c646d766b8faf402ebf0eb52d628e Mon Sep 17 00:00:00 2001 From: florianf Date: Tue, 9 Mar 2010 13:05:45 +0000 Subject: [PATCH] Owl badguy: Fix turn-around behavior. Turning back to the initial direction was broken. git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6588 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- src/badguy/owl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/badguy/owl.cpp b/src/badguy/owl.cpp index 152def3d6..db8b2fe7c 100644 --- a/src/badguy/owl.cpp +++ b/src/badguy/owl.cpp @@ -137,10 +137,12 @@ Owl::collision_solid(const CollisionHit& hit) } else if(hit.left || hit.right) { if (dir == LEFT) { set_action ("right", /* loops = */ -1); + dir = RIGHT; physic.set_velocity_x (FLYING_SPEED); } else { set_action ("left", /* loops = */ -1); + dir = LEFT; physic.set_velocity_x (-FLYING_SPEED); } } -- 2.11.0