From a3ffce74c5953a59d84903a2fe65a27f95c0ada2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Mon, 15 Mar 2004 18:44:50 +0000 Subject: [PATCH] fixed bad laptops SVN-Revision: 247 --- src/badguy.c | 24 ++++++++++++++++-------- src/leveleditor.c | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/badguy.c b/src/badguy.c index 29f19c1b1..09703ecf1 100644 --- a/src/badguy.c +++ b/src/badguy.c @@ -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, diff --git a/src/leveleditor.c b/src/leveleditor.c index 6da610c95..d0d7b9e13 100644 --- a/src/leveleditor.c +++ b/src/leveleditor.c @@ -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); -- 2.11.0