- collision fix
authorRyan Flegel <rflegel@gmail.com>
Sun, 16 May 2004 18:44:54 +0000 (18:44 +0000)
committerRyan Flegel <rflegel@gmail.com>
Sun, 16 May 2004 18:44:54 +0000 (18:44 +0000)
SVN-Revision: 1221

src/badguy.cpp

index 9fd6ccc..d2fe17d 100644 (file)
@@ -1095,7 +1095,8 @@ BadGuy::collision(void *p_c_object, int c_object, CollisionType type)
               physic.set_velocity_x(fabsf(physic.get_velocity_x()));
 
               // in case badguys get "jammed"
-              base.x = pbad_c->base.x + pbad_c->base.width;
+              if (physic.get_velocity_x() != 0)
+                base.x = pbad_c->base.x + pbad_c->base.width;
             }
             else if (dir == RIGHT)
             {