From: Tobias Gläßer Date: Sun, 14 Mar 2004 02:58:20 +0000 (+0000) Subject: some laptop-bus were fixed (through Ricardo's patch) X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d71fbdff0372d62ec97a9b51628a8146b89d9f35;p=supertux.git some laptop-bus were fixed (through Ricardo's patch) SVN-Revision: 211 --- diff --git a/src/badguy.c b/src/badguy.c index fc0b3109e..ad763e76a 100644 --- a/src/badguy.c +++ b/src/badguy.c @@ -140,7 +140,7 @@ void badguy_action(bad_guy_type* pbad) /* Move left/right: */ - if (pbad->mode != HELD) + if (pbad->mode == NORMAL || pbad->mode == KICK) { if (pbad->dying == NO || pbad->dying == FALLING) @@ -568,7 +568,7 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object) break; case CO_BADGUY: pbad_c = (bad_guy_type*) p_c_object; - if (pbad->mode != FLAT) + if (pbad->mode == NORMAL) pbad->dir = !pbad->dir; else { @@ -581,7 +581,6 @@ 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->dir = !pbad->dir; break; case CO_PLAYER: pplayer_c = (player_type*) p_c_object; @@ -602,7 +601,7 @@ void badguy_collision(bad_guy_type* pbad, void *p_c_object, int c_object) else if (pbad->kind == BAD_LAPTOP) { - if (pbad->mode != KICK) + if (pbad->mode == NORMAL || pbad->mode == KICK) { /* Flatten! */ @@ -615,7 +614,7 @@ 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.); } - else + else if (pbad->mode == FLAT) { /* Kick! */