From: Tobias Gläßer Date: Sat, 27 Mar 2004 00:14:46 +0000 (+0000) Subject: fixed BSOD hopping X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fbb94943a486b66491518d1a5c6e2f074b942b20;p=supertux.git fixed BSOD hopping SVN-Revision: 385 --- diff --git a/src/badguy.cpp b/src/badguy.cpp index 611ddcfd0..0c76659f2 100644 --- a/src/badguy.cpp +++ b/src/badguy.cpp @@ -124,7 +124,7 @@ void BadGuy::action_bsod() if (!dying) check_horizontal_bump(); - fall(); + fall(true); // Handle dying timer: if (dying == DYING_SQUISHED) @@ -260,7 +260,7 @@ void BadGuy::check_horizontal_bump(bool checkcliff) } } -void BadGuy::fall() +void BadGuy::fall(bool dojump) { /* Fall if we get off the ground: */ if (dying != DYING_FALLING) @@ -270,7 +270,7 @@ void BadGuy::fall() if(!physic_is_set(&physic)) { physic_set_state(&physic,PH_VT); - physic_set_start_vy(&physic,0.); + physic_set_start_vy(&physic, dojump ? 2. : 0.); } if(mode != HELD) diff --git a/src/badguy.h b/src/badguy.h index ca4e16cca..76d25cca0 100644 --- a/src/badguy.h +++ b/src/badguy.h @@ -106,7 +106,7 @@ class BadGuy CollisionType type = COLLISION_NORMAL); private: - void fall(); + void fall(bool dojump=false); void remove_me(); void action_bsod();