Skip to content

Commit

Permalink
Move falling badguys to LAYER_FALLING (= 500), fixes bug 1033
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbi committed Oct 13, 2013
1 parent 53d98aa commit fbcb768
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/badguy/badguy.cpp
Expand Up @@ -31,6 +31,7 @@ static const float SQUISH_TIME = 2;

static const float X_OFFSCREEN_DISTANCE = 1280;
static const float Y_OFFSCREEN_DISTANCE = 800;
static const int LAYER_FALLING = 500;

BadGuy::BadGuy(const Vector& pos, const std::string& sprite_name, int layer) :
MovingSprite(pos, sprite_name, layer, COLGROUP_DISABLED),
Expand Down Expand Up @@ -394,6 +395,7 @@ BadGuy::kill_fall()
physic.set_acceleration_y(0);
physic.enable_gravity(true);
set_state(STATE_FALLING);
layer = LAYER_FALLING;

// start dead-script
run_dead_script();
Expand Down

0 comments on commit fbcb768

Please sign in to comment.