fixed bad laptops
authorTobias Gläßer <tobi.web@gmx.de>
Mon, 15 Mar 2004 18:44:50 +0000 (18:44 +0000)
committerTobias Gläßer <tobi.web@gmx.de>
Mon, 15 Mar 2004 18:44:50 +0000 (18:44 +0000)
SVN-Revision: 247

src/badguy.c
src/leveleditor.c

index 29f19c1..09703ec 100644 (file)
@@ -575,9 +575,10 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object)
       {
       /* do nothing */
       }
-      else
+      else if(pbad->mode == KICK)
         {
-          /* We're in kick mode, kill the other guy: */
+          /* We're in kick mode, kill the other guy
+            and yourself(wuahaha) : */
 
           pbad_c->dying = FALLING;
           pbad_c->base.ym = -8;
@@ -585,6 +586,13 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object)
 
           add_score(pbad->base.x - scroll_x,
                     pbad->base.y, 100);
+                 pbad_c->dying = FALLING;
+                 
+          pbad->dying = FALLING;
+          pbad->base.ym = -8;
+
+          add_score(pbad_c->base.x - scroll_x,
+                    pbad_c->base.y, 100);
         }
       break;
     case CO_PLAYER:
@@ -597,7 +605,7 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object)
               timer_start(&pbad->timer,4000);
               physic_set_state(&pplayer_c->vphysic,PH_VT);
               physic_set_start_vy(&pplayer_c->vphysic,2.);
-             pplayer_c->base.y = pbad->base.y - pplayer_c->base.height;
+             pplayer_c->base.y = pbad->base.y - pplayer_c->base.height - 1;
 
               add_score(pbad->base.x - scroll_x, pbad->base.y,
                         50 * score_multiplier);
@@ -619,12 +627,11 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object)
 
                   physic_set_state(&pplayer_c->vphysic,PH_VT);
                   physic_set_start_vy(&pplayer_c->vphysic,2.);
-                 pplayer_c->base.y = pbad->base.y - pplayer_c->base.height;
+                 pplayer_c->base.y = pbad->base.y - pplayer_c->base.height - 1;
                 }
               else if (pbad->mode == FLAT)
                 {
                   /* Kick! */
-
                   play_sound(sounds[SND_KICK], SOUND_CENTER_SPEAKER);
 
                   if (pplayer_c->base.x <= pbad->base.x)
@@ -632,14 +639,15 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object)
                   else
                     pbad->dir = LEFT;
 
-                  pbad->base.xm = 8;
+                  pbad->base.xm = 5;
+                 pbad->mode = KICK;
 
                   timer_start(&pbad->timer,5000);
                 }
-
+               
               physic_set_state(&pplayer_c->vphysic,PH_VT);
               physic_set_start_vy(&pplayer_c->vphysic,2.);
-             pplayer_c->base.y = pbad->base.y - pplayer_c->base.height;
+             pplayer_c->base.y = pbad->base.y - pplayer_c->base.height - 1;
              
               add_score(pbad->base.x - scroll_x,
                         pbad->base.y,
index 6da610c..d0d7b9e 100644 (file)
@@ -441,7 +441,7 @@ int le_init()
   button_load(&le_move_right_bt,"/images/icons/right.png","Move right",SDLK_RIGHT,screen->w-80,0);
   button_load(&le_fgd_bt,"/images/icons/fgd.png","Foreground tiles", SDLK_F7,screen->w-64,82);
   button_load(&le_bkgd_bt,"/images/icons/bgd.png","Background tiles", SDLK_F8,screen->w-43,82);
-  button_load(&le_bad_bt,"/images/icons/bad.png","Bad guys", SDLK_F9,screen->w-22,82);
+  button_load(&le_bad_bt,"/images/icons/emy.png","Enemies", SDLK_F9,screen->w-22,82);
 
   bkgd_files =  dfiles("images/themes/antarctica","bkgd-", NULL);
   string_list_sort(&bkgd_files);