From: Florian Forster Date: Tue, 9 Mar 2010 13:05:45 +0000 (+0000) Subject: Owl badguy: Fix turn-around behavior. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=806e78a1236f26ed0ffe7cfc10d814172905c0eb;p=supertux.git Owl badguy: Fix turn-around behavior. Turning back to the initial direction was broken. SVN-Revision: 6588 --- 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); } }