corrected 2 badguys behaviour thingies
authorRicardo Cruz <rick2@aeiou.pt>
Fri, 19 Mar 2004 01:23:41 +0000 (01:23 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Fri, 19 Mar 2004 01:23:41 +0000 (01:23 +0000)
SVN-Revision: 261

src/badguy.cpp

index 09703ec..f09a32e 100644 (file)
@@ -179,7 +179,8 @@ void badguy_action(bad_guy_type* pbad)
                         pbad->base.x += 24;
 
                       pbad->mode=KICK;
-                      pbad->base.ym-=8;
+                      pbad->base.xm = 8;
+                      pbad->base.ym = 8;
                       play_sound(sounds[SND_KICK],SOUND_CENTER_SPEAKER);
                     }
                 }
@@ -634,7 +635,7 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object)
                   /* Kick! */
                   play_sound(sounds[SND_KICK], SOUND_CENTER_SPEAKER);
 
-                  if (pplayer_c->base.x <= pbad->base.x)
+                  if (pplayer_c->base.x < pbad->base.x + (pbad->base.width/2))
                     pbad->dir = RIGHT;
                   else
                     pbad->dir = LEFT;